From 4c73584025d0d70fde4a8e5c17d8a1d42a2a72ff Mon Sep 17 00:00:00 2001 From: B YI Date: Tue, 10 Mar 2020 00:07:34 +0800 Subject: [PATCH] aws: fix awscli completion path on NixOS (#8707) --- plugins/aws/aws.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index eab3dc76b..6fa8362ca 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -92,6 +92,9 @@ else # Ubuntu elif [[ -e /usr/share/zsh/vendor-completions/_awscli ]]; then _aws_zsh_completer_path=/usr/share/zsh/vendor-completions/_awscli + # NixOS + elif [[ -e "${commands[aws]:P:h:h}/share/zsh/site-functions/aws_zsh_completer.sh" ]]; then + _aws_zsh_completer_path="${commands[aws]:P:h:h}/share/zsh/site-functions/aws_zsh_completer.sh" # RPM else _aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh