d79941b78997f7c11e247c08678fd57827db3b42

Author
Lutz Horn <code@lhorn.de>
Committer
GitHub <noreply@github.com>
Date

Message

aws: allow @ in AWS profiles (#9099)

Fixes #9060 by matching a `@` in the AWS profile name.

Diff

 1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 2index 4b5446407fd8214797b9aa40352e76c84d63b39a..d00c2e56c54bbf89cb291918b13d6d6a6393b73b 100644
 3--- a/plugins/aws/aws.plugin.zsh
 4+++ b/plugins/aws/aws.plugin.zsh
 5@@ -41,7 +41,7 @@ function aws_change_access_key() {
 6 
 7 function aws_profiles() {
 8   [[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
 9-  grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'
10+  grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9@_\.-]*\).*/\1/'
11 }
12 
13 function _aws_profiles() {