summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2014-03-13 08:07:46 -0700
committerRobby Russell <robby@planetargon.com>2014-03-13 08:07:46 -0700
commitde78e47d27e758ab5dc418a2e546725da07d1ea3 (patch)
tree7905006f7b4f801337ad8dc1c66ee4d43352551a
parent7adf66f942cc143aea6ced780b249f0e989e5461 (diff)
parent190fcdffa7bc413dc7a9ebef4a6eaed37beb6896 (diff)
downloadzsh-de78e47d27e758ab5dc418a2e546725da07d1ea3.tar.gz
zsh-de78e47d27e758ab5dc418a2e546725da07d1ea3.tar.bz2
zsh-de78e47d27e758ab5dc418a2e546725da07d1ea3.zip
Merge pull request #2149 from cristim/master
Added a completion plugin for the new aws-cli tool
-rw-r--r--plugins/aws/aws.plugin.zsh17
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
new file mode 100644
index 000000000..3f7fb1995
--- /dev/null
+++ b/plugins/aws/aws.plugin.zsh
@@ -0,0 +1,17 @@
+export AWS_HOME=~/.aws
+
+function agp {
+ echo $AWS_DEFAULT_PROFILE
+
+}
+function asp {
+ export AWS_DEFAULT_PROFILE=$1
+ export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
+
+}
+function aws_profiles {
+ reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
+}
+
+compctl -K aws_profiles asp
+source `which aws_zsh_completer.sh`