From d3e20cbdb2ffc1e5906311479c7288858efe6ec1 Mon Sep 17 00:00:00 2001 From: Hosh Date: Thu, 19 Apr 2018 14:27:29 +0100 Subject: [PATCH] Update AWS completion --- 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