summaryrefslogtreecommitdiff
path: root/plugins/aws/aws.plugin.zsh
diff options
context:
space:
mode:
authorJorge Vargas <yorch.veintemil+github@gmail.com>2018-10-27 15:59:03 -0700
committerMarc Cornellà <marc.cornella@live.com>2018-10-28 16:01:28 +0100
commit543044efe3940b623069996cf6b2f5127635815f (patch)
tree1dd7db68a79080fcd59ffd5cba5fff289a65f6db /plugins/aws/aws.plugin.zsh
parente4946ef9f94360dd4767c2e58274cd62057822a5 (diff)
downloadzsh-543044efe3940b623069996cf6b2f5127635815f.tar.gz
zsh-543044efe3940b623069996cf6b2f5127635815f.tar.bz2
zsh-543044efe3940b623069996cf6b2f5127635815f.zip
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
Diffstat (limited to 'plugins/aws/aws.plugin.zsh')
-rw-r--r--plugins/aws/aws.plugin.zsh4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
index 252c0d9c1..f78e96ce3 100644
--- a/plugins/aws/aws.plugin.zsh
+++ b/plugins/aws/aws.plugin.zsh
@@ -21,8 +21,6 @@ _awscli-homebrew-installed() {
[ -r $_brew_prefix/libexec/bin/aws_zsh_completer.sh ] &> /dev/null
}
-export AWS_HOME=~/.aws
-
function agp {
echo $AWS_PROFILE
}
@@ -37,7 +35,7 @@ function asp {
}
function aws_profiles {
- reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
+ reply=($(grep profile "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
}
compctl -K aws_profiles asp