From e8c328cb394e39f8d1c7d18b85b0be12bd71c556 Mon Sep 17 00:00:00 2001 From: Hosh Date: Thu, 10 May 2018 19:53:16 +0100 Subject: [PATCH] Update AWS completion (#6745) --- plugins/aws/aws.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 6a0e04ad..a326e2e0 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