summaryrefslogtreecommitdiff
path: root/plugins/aws
diff options
context:
space:
mode:
authorAndrew Janke <andrew@apjanke.net>2015-09-23 18:53:05 -0400
committerAndrew Janke <andrew@apjanke.net>2015-09-23 18:53:05 -0400
commit96ff86142e9037e707f9cde8ab69e0425a0559c6 (patch)
tree217cb5e2b4a1c55afec79984c3c3c0a9efe2bf69 /plugins/aws
parent502f08b5e19716d43a7ec8b006178a7b017f68cd (diff)
parent76a26a2a59d8c6d0f65a4426cdb93920e255aea7 (diff)
downloadzsh-96ff86142e9037e707f9cde8ab69e0425a0559c6.tar.gz
zsh-96ff86142e9037e707f9cde8ab69e0425a0559c6.tar.bz2
zsh-96ff86142e9037e707f9cde8ab69e0425a0559c6.zip
Merge branch 'master' into installer-cygwin-support-3
Conflicts: tools/install.sh
Diffstat (limited to 'plugins/aws')
-rw-r--r--plugins/aws/aws.plugin.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
index 7246db9f0..d31052f83 100644
--- a/plugins/aws/aws.plugin.zsh
+++ b/plugins/aws/aws.plugin.zsh
@@ -11,11 +11,16 @@ export AWS_HOME=~/.aws
function agp {
echo $AWS_DEFAULT_PROFILE
}
+
function asp {
+ local rprompt=${RPROMPT/<aws:$(agp)>/}
+
export AWS_DEFAULT_PROFILE=$1
export AWS_PROFILE=$1
- export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$RPROMPT"
+
+ export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$rprompt"
}
+
function aws_profiles {
reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
}