浏览代码

Set AWS_PROFILE and use existing RPROMPT

Werner Buck 10 年之前
父节点
当前提交
5770ad51f9
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      plugins/aws/aws.plugin.zsh

+ 2 - 1
plugins/aws/aws.plugin.zsh

@@ -13,7 +13,8 @@ function agp {
 }
 }
 function asp {
 function asp {
   export AWS_DEFAULT_PROFILE=$1
   export AWS_DEFAULT_PROFILE=$1
-  export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
+  export AWS_PROFILE=$1
+  export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$RPROMPT"
 }
 }
 function aws_profiles {
 function aws_profiles {
   reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
   reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))