summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDouglas S.D. Hall <doug.hall@gmail.com>2014-08-30 17:20:28 +0100
committerDouglas S.D. Hall <doug.hall@gmail.com>2014-08-30 17:20:28 +0100
commitf49220732904ed254400f14e621ea5ebe9e4a5f5 (patch)
tree86213e47550f4e8a5cf800f3c67573e36b2a3421 /plugins
parent1b7a3ea99a8b566510ab7881063148c43be6b98d (diff)
downloadzsh-f49220732904ed254400f14e621ea5ebe9e4a5f5.tar.gz
zsh-f49220732904ed254400f14e621ea5ebe9e4a5f5.tar.bz2
zsh-f49220732904ed254400f14e621ea5ebe9e4a5f5.zip
Amended to source the original aws_zsh_completer.sh rather than
the mangled version installed into $(brew-prefix)/bin if using homebrew installed awscli on OSX. This was discussed here - https://github.com/Homebrew/homebrew/issues/30268
Diffstat (limited to 'plugins')
-rw-r--r--plugins/aws/aws.plugin.zsh15
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