summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/aws/aws.plugin.zsh8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
index 6a0e04add..a326e2e01 100644
--- a/plugins/aws/aws.plugin.zsh
+++ b/plugins/aws/aws.plugin.zsh
@@ -42,11 +42,11 @@ function aws_profiles {
compctl -K aws_profiles asp
-if _homebrew-installed && _awscli-homebrew-installed ; then
+if which aws_zsh_completer.sh &>/dev/null; then
+ _aws_zsh_completer_path=$(which aws_zsh_completer.sh 2>/dev/null)
+elif _homebrew-installed && _awscli-homebrew-installed; then
_aws_zsh_completer_path=$_brew_prefix/libexec/bin/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
+[ -n "$_aws_zsh_completer_path" ] && [ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path
unset _aws_zsh_completer_path