Created
September 23, 2024 04:55
-
-
Save amzar96/4c3ec4e16783641b89086f46b5d1f9ed to your computer and use it in GitHub Desktop.
Display current AWS SSO account name in zsh prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function awslogin() { | |
local profile_name=$1 | |
aws sso login --profile $profile_name | |
export AWS_PROFILE_NAME=$profile_name | |
echo change the AWS_PROFILE_NAME to $profile_name | |
} | |
RPROMPT='%{$fg[cyan]%}%* %{$fg[yellow]%}($AWS_PROFILE_NAME)%{$reset_color%}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment