diff options
Diffstat (limited to 'plugins/aws')
-rw-r--r-- | plugins/aws/aws.plugin.zsh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 6a0e04add..183b0f226 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -37,16 +37,15 @@ function asp { } function aws_profiles { - reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/')) + reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/')) } - 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 |