aws: fix awscli completion path on NixOS (#8707)

This commit is contained in:
B YI 2020-03-10 00:07:34 +08:00 committed by GitHub
parent bc7f596dc0
commit 4c73584025
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,6 +92,9 @@ else
# Ubuntu # Ubuntu
elif [[ -e /usr/share/zsh/vendor-completions/_awscli ]]; then elif [[ -e /usr/share/zsh/vendor-completions/_awscli ]]; then
_aws_zsh_completer_path=/usr/share/zsh/vendor-completions/_awscli _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 # RPM
else else
_aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh _aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh