From 23fe22e95098b26d600e5f8eb3465d5c4aed33b5 Mon Sep 17 00:00:00 2001 From: John Jannotti Date: Fri, 29 Jul 2016 13:58:58 -0400 Subject: [PATCH] Fix up search process for aws_zsh_completer.sh in the non-brew case. --- plugins/aws/aws.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index d31052f83..cdefb74f6 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -29,9 +29,11 @@ compctl -K aws_profiles asp if _homebrew-installed && _awscli-homebrew-installed ; then _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh +elif [ -e /usr/share/zsh/site-functions/aws_zsh_completer.sh ]; then + _aws_zsh_completer_path=/usr/share/zsh/site-functions/aws_zsh_completer.sh else _aws_zsh_completer_path=$(which aws_zsh_completer.sh) fi -[ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path +[ -e "$_aws_zsh_completer_path" ] && source "$_aws_zsh_completer_path" unset _aws_zsh_completer_path