diff options
author | Robby Russell <robby@planetargon.com> | 2014-08-31 10:17:21 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-08-31 10:17:21 -0700 |
commit | 6d5d67a35dcc8262dec72cd610ebfef355986f41 (patch) | |
tree | 7862632aa5fc231b566445142da5746aa7fa0458 | |
parent | e425ddc0ef644f697872f094b2596553dcdc2ee5 (diff) | |
parent | f49220732904ed254400f14e621ea5ebe9e4a5f5 (diff) | |
download | zsh-6d5d67a35dcc8262dec72cd610ebfef355986f41.tar.gz zsh-6d5d67a35dcc8262dec72cd610ebfef355986f41.tar.bz2 zsh-6d5d67a35dcc8262dec72cd610ebfef355986f41.zip |
Merge pull request #3067 from tacgnol/AWS
Fix issue with homebrew installed awscli
-rw-r--r-- | plugins/aws/aws.plugin.zsh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 3f7fb1995..8b57d7db1 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -1,3 +1,11 @@ +_homebrew-installed() { + type brew &> /dev/null +} + +_awscli-homebrew-installed() { + brew --prefix awscli &> /dev/null +} + export AWS_HOME=~/.aws function agp { @@ -14,4 +22,9 @@ function aws_profiles { } compctl -K aws_profiles asp -source `which aws_zsh_completer.sh` + +if _homebrew-installed && _awscli-homebrew-installed ; then + source $(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh +else + source `which aws_zsh_completer.sh` +fi |