1
0
mirror of https://github.com/akelge/zsh synced 2025-07-03 13:09:07 +00:00

Fixes for OMP prompts and for default PATH

This commit is contained in:
2021-12-17 09:14:01 +01:00
parent 0ae9cfdb9e
commit 51bd0516d6
8 changed files with 185 additions and 13 deletions

View File

@ -21,8 +21,6 @@ if [ $profile ]; then # We got a profile pattern, look for a match
print -P "$FX[bold]activating profile $FG[075]$match$FX[reset]"
export AWS_DEFAULT_PROFILE=$match
export AWS_PROFILE=$match
export AWS_DEFAULT_REGION=$(grep -A1 $match ~/.aws/config|grep region|cut -d" " -f3)
export AWS_REGION=${AWS_DEFAULT_REGION}
return
else
print -P "$FX[bold]$FG[009]no match for $profile$FX[reset]"
@ -30,7 +28,7 @@ if [ $profile ]; then # We got a profile pattern, look for a match
fi
elif [ $AWS_PROFILE ]; then # no profile passed, clean up current one, logout
unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_DEFAULT_REGION AWS_REGION
unset AWS_DEFAULT_PROFILE AWS_PROFILE
print -P "$FX[bold]profile cleared$FX[reset]."
return
fi