summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/aws/aws.plugin.zsh15
-rw-r--r--plugins/brew/_brew1
2 files changed, 15 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
diff --git a/plugins/brew/_brew b/plugins/brew/_brew
index 9eb3bb557..40442a1d3 100644
--- a/plugins/brew/_brew
+++ b/plugins/brew/_brew
@@ -50,6 +50,7 @@ _1st_arguments=(
'server:start a local web app that lets you browse formulae (requires Sinatra)'
'services:small wrapper around `launchctl` for supported formulae'
'tap:tap a new formula repository from GitHub, or list existing taps'
+ 'uninstall:uninstall a formula'
'unlink:unlink a formula'
'unpin:unpin specified formulae'
'untap:remove a tapped repository'