diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2017-10-07 04:43:43 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2017-10-07 04:43:43 +0300 |
commit | 2a7f3966c266c1f0229532d80a76adc041d92798 (patch) | |
tree | 91dac8c7587149ed5fa61298f2767540a77483fc /powerlevel9k.zsh-theme | |
parent | 6136152997444dd0b25a6ad2879b496b2fe474a6 (diff) | |
parent | 01b554cda8dab4d8854d93f41420a050917a3753 (diff) |
Merge branch 'master' into next
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 7770fb0a..f2fc9d90 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -570,7 +570,7 @@ prompt_context() { local content="" - if [[ "$POWERLEVEL9K_ALWAYS_SHOW_CONTEXT" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then + if [[ "$POWERLEVEL9K_ALWAYS_SHOW_CONTEXT" == true ]] || [[ "$(whoami)" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then if [[ $(print -P "%#") == '#' ]]; then current_state="ROOT" @@ -579,7 +579,7 @@ prompt_context() { content="${POWERLEVEL9K_CONTEXT_TEMPLATE}" elif [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]]; then - content="$USER" + content="$(whoami)" else return fi @@ -594,7 +594,7 @@ set_default POWERLEVEL9K_USER_TEMPLATE "%n" prompt_user() { local current_state="DEFAULT" typeset -AH user_state - if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]]; then + if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$(whoami)" != "$DEFAULT_USER" ]]; then if [[ $(print -P "%#") == '#' ]]; then user_state=( "STATE" "ROOT" @@ -606,7 +606,7 @@ prompt_user() { else user_state=( "STATE" "DEFAULT" - "CONTENT" "$USER" + "CONTENT" "$(whoami)" "BACKGROUND_COLOR" "${DEFAULT_COLOR}" "FOREGROUND_COLOR" "011" "VISUAL_IDENTIFIER" "USER_ICON" |