mirror of https://github.com/akelge/zsh
Really fix typos
This commit is contained in:
parent
e4335ba022
commit
c2f1f88766
|
@ -5,7 +5,7 @@ if [ $profile ]; then # We got a profile pattern, look for a match
|
||||||
match_no=$(echo $match|wc -l) # Number of profile matching
|
match_no=$(echo $match|wc -l) # Number of profile matching
|
||||||
|
|
||||||
if [ $match_no -gt 1 ]; then # more than one match
|
if [ $match_no -gt 1 ]; then # more than one match
|
||||||
print -P "$FX[bold]Multiple profile match:"
|
print -P "$FX[bold]multiple profile match:"
|
||||||
print -P "$FG[003]"
|
print -P "$FG[003]"
|
||||||
echo $match
|
echo $match
|
||||||
print -P "$FX[reset]"
|
print -P "$FX[reset]"
|
||||||
|
@ -13,14 +13,14 @@ if [ $profile ]; then # We got a profile pattern, look for a match
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $match ]; then # Single match, setting profile
|
if [ $match ]; then # Single match, setting profile
|
||||||
print -P "$FX[bold]Activating profile $FG[075]$match$FX[reset]"
|
print -P "$FX[bold]activating profile $FG[075]$match$FX[reset]"
|
||||||
export AWS_DEFAULT_PROFILE=$match
|
export AWS_DEFAULT_PROFILE=$match
|
||||||
export AWS_PROFILE=$match
|
export AWS_PROFILE=$match
|
||||||
export AWS_DEFAULT_REGION=$(grep -A1 $match ~/.aws/config|grep region|cut -d" " -f3)
|
export AWS_DEFAULT_REGION=$(grep -A1 $match ~/.aws/config|grep region|cut -d" " -f3)
|
||||||
export AWS_REGION=${AWS_DEFAULT_REGION}
|
export AWS_REGION=${AWS_DEFAULT_REGION}
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
print -P "$FX[bold]$FG[009]No match for $profile$FX[reset]"
|
print -P "$FX[bold]$FG[009]no match for $profile$FX[reset]"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ elif [ $AWS_PROFILE ]; then # no profile passed, clean up current one, logout
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print -P "$FX[bold]Available profiles"
|
print -P "$FX[bold]available profiles"
|
||||||
print -P "$FG[075]"
|
print -P "$FG[075]"
|
||||||
grep profile ~/.aws/config | sed -E 's/\[profile (.+)\]/\1/'
|
grep profile ~/.aws/config | sed -E 's/\[profile (.+)\]/\1/'
|
||||||
print -P "$FX[reset]"
|
print -P "$FX[reset]"
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue