1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-09-21 11:00:08 +00:00

aws: consult AWS_VAULT; hide if "default"

This commit is contained in:
romkatv 2019-09-24 14:29:21 +02:00
parent f6d361d70a
commit cf00c04d1b

View file

@ -857,8 +857,8 @@ prompt_anaconda() {
################################################################ ################################################################
# AWS Profile # AWS Profile
prompt_aws() { prompt_aws() {
local aws_profile="${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}" local aws_profile="${AWS_VAULT:-${AWS_PROFILE:-$AWS_DEFAULT_PROFILE}}"
if [[ -n "$aws_profile" ]]; then if [[ "$aws_profile" != (default|) ]]; then
_p9k_prompt_segment "$0" red white 'AWS_ICON' 0 '' "${aws_profile//\%/%%}" _p9k_prompt_segment "$0" red white 'AWS_ICON' 0 '' "${aws_profile//\%/%%}"
fi fi
} }
@ -1860,6 +1860,7 @@ prompt_dotnet_version() {
_p9k_prompt_segment "$0" "magenta" "white" 'DOTNET_ICON' 0 '' "$_p9k_ret" _p9k_prompt_segment "$0" "magenta" "white" 'DOTNET_ICON' 0 '' "$_p9k_ret"
} }
################################################################ ################################################################
# Segment to print a little OS icon # Segment to print a little OS icon
prompt_os_icon() { prompt_os_icon() {