0cc1266c17204b84255f924f099152c9e4f0383f

Author
Anton Stamenov <lidow@users.noreply.github.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

aws_porfiles regex is catching more lines than profiles, thus breaking completion (#7469)

Diff

 1diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 2index f78e96ce361c157d3c05e64d4049d6436b914a32..af27e669a63ce1fdb56fc45ea2014dacc019eef4 100644
 3--- a/plugins/aws/aws.plugin.zsh
 4+++ b/plugins/aws/aws.plugin.zsh
 5@@ -35,7 +35,7 @@ function asp {
 6 }
 7 
 8 function aws_profiles {
 9-  reply=($(grep profile "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
10+  reply=($(grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'))
11 }
12 compctl -K aws_profiles asp
13