0726c1099fec6599dbf91a260f21d6d45fd8f309
- Author
- Hans Donner <hans@hansdonner.nl>
- Committer
- GitHub <noreply@github.com>
- Date
Message
fix(aws): allow non-space characters in profile names (#11040)
Diff
1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
2index b8625d7ac0791631a26a82dc0c24280b46f3d0c6..2167f552cd4b5365e6d410f653fa08a793816a2e 100644
3--- a/plugins/aws/aws.plugin.zsh
4+++ b/plugins/aws/aws.plugin.zsh
5@@ -147,7 +147,7 @@ function aws_change_access_key() {
6
7 function aws_profiles() {
8 [[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
9- grep --color=never -Eo '\[.*\]' "${AWS_CONFIG_FILE:-$HOME/.aws/config}" | sed -E 's/^[[:space:]]*\[(profile)?[[:space:]]*([-_[:alnum:]\.@]+)\][[:space:]]*$/\2/g'
10+ grep --color=never -Eo '\[.*\]' "${AWS_CONFIG_FILE:-$HOME/.aws/config}" | sed -E 's/^[[:space:]]*\[(profile)?[[:space:]]*([^[:space:]]+)\][[:space:]]*$/\2/g'
11 }
12
13 function _aws_profiles() {