mirror of https://github.com/akelge/zsh
14 lines
319 B
Plaintext
14 lines
319 B
Plaintext
if [ $1 ]; then
|
|
export AWS_DEFAULT_PROFILE=$1
|
|
export AWS_PROFILE=$1
|
|
export AWS_EB_PROFILE=$1
|
|
return
|
|
elif [ $AWS_PROFILE ]; then
|
|
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE
|
|
echo AWS profile cleared.
|
|
return
|
|
fi
|
|
|
|
echo "Available profiles"
|
|
grep profile ~/.aws/config | sed -E 's/\[profile (.+)\]/\1/'
|