Merge branch 'master' of github.com:akelge/zsh

This commit is contained in:
Andrea Mistrali 2021-12-10 19:47:23 +01:00
commit 368dc1d452
No known key found for this signature in database
GPG Key ID: 6FB0A77F6D5DA9B2
2 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
profile=$1
if [ ! -f ~/.aws/config ]; then
echo "no aws config file found, bailing out..."
return 1
fi
if [ $profile ]; then # We got a profile pattern, look for a match
match=$(grep -E "\[profile .*$profile.*" ~/.aws/config | sed -E 's/\[profile (.+)\]/\1/') # Array of matching profiles
match_no=$(echo $match|wc -l) # Number of profile matching

Binary file not shown.