aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2017-10-07 03:28:08 +0300
committerGitHub <noreply@github.com>2017-10-07 03:28:08 +0300
commit000da51aeae730db682c4e886e91916e9b1f493d (patch)
tree750fcdabea5aa680b7ce9531fb35cf6a6b7c5f0a
parent386a39671fc1e9d6420616c72de54e36c4379722 (diff)
parentec47f1b583d5e40e299f9b4b065fe1626240e5e5 (diff)
Merge pull request #636 from ZeGentzy/master
Fixes issue #619
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 7e7b4e11..97d13a3c 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"