543044efe3940b623069996cf6b2f5127635815f
Author Jorge Vargas <yorch.veintemil+github@gmail.com> Committer Marc Cornellà <marc.cornella@live.com> Date 2018-10-28 15:01 UTC
Message aws: use AWS_CONFIG_FILE to complete profiles
Stop exporting AWS_HOME and use the standard AWS_CONFIG_FILE environment
variable, with a fallback to ~/.aws/config (default location) if not
defined.
Close #7356
Diff 1 diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
2 index 252c0d9c11d731d4536b9f00d64eb5444e14e416..f78e96ce361c157d3c05e64d4049d6436b914a32 100644
3 --- a/plugins/aws/aws.plugin.zsh
4 +++ b/plugins/aws/aws.plugin.zsh
5 @@ -21,8 +21,6 @@ _awscli-homebrew-installed() {
6 [ -r $_brew_prefix/libexec/bin/aws_zsh_completer.sh ] &> /dev/null
7 }
8
9 -export AWS_HOME=~/.aws
10 -
11 function agp {
12 echo $AWS_PROFILE
13 }
14 @@ -37,7 +35,7 @@ function asp {
15 }
16
17 function aws_profiles {
18 - reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
19 + reply=($(grep profile "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
20 }
21 compctl -K aws_profiles asp
22