diff options
author | Noam Cohen <noam@noam.me> | 2023-01-13 15:35:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 14:35:30 +0100 |
commit | eb2147c7159cf1ed14b1e5b6784d7d07c3662b52 (patch) | |
tree | a3519f9f1a2c0f6a934c0184fd5276964ef04f62 | |
parent | ec0003f2faaf45e8e11660c5b66e98d10d462ee5 (diff) | |
download | zsh-eb2147c7159cf1ed14b1e5b6784d7d07c3662b52.tar.gz zsh-eb2147c7159cf1ed14b1e5b6784d7d07c3662b52.tar.bz2 zsh-eb2147c7159cf1ed14b1e5b6784d7d07c3662b52.zip |
feat(aws): load profiles from credentials file (#11196)
Fixes #8472
-rw-r--r-- | plugins/aws/aws.plugin.zsh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 2167f552c..865e82f19 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -146,6 +146,7 @@ function aws_change_access_key() { } function aws_profiles() { + aws --no-cli-pager configure list-profiles 2> /dev/null && return [[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1 grep --color=never -Eo '\[.*\]' "${AWS_CONFIG_FILE:-$HOME/.aws/config}" | sed -E 's/^[[:space:]]*\[(profile)?[[:space:]]*([^[:space:]]+)\][[:space:]]*$/\2/g' } |