aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2017-05-25 22:47:51 +0300
committerBen Hilburn <bhilburn@gmail.com>2017-05-25 22:47:51 +0300
commitd9014c67a384db7740a7766c9970973b2c617a47 (patch)
tree350a09c13c904f240129f2771bec63c8e04d7991
parent44764285c31b9355078c955a747f2189acae964d (diff)
parentde6a9388e9f4467e1e68bff7e24051a7d5c2b4b0 (diff)
Merge branch 'host_user' of https://github.com/onaforeignshore/powerlevel9k into onaforeignshore-host_user
-rw-r--r--README.md4
-rwxr-xr-xpowerlevel9k.zsh-theme4
2 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index e379460a..b4450ca7 100644
--- a/README.md
+++ b/README.md
@@ -552,8 +552,8 @@ POWERLEVEL9K_ROOT_ICON="#"
| Variable | Default Value | Description |
|----------|---------------|-------------|
-|`DEFAULT_USER`|None|Username to consider a "default context" (you can also set `$USER`).|
-|`POWERLEVEL9K_ALWAYS_SHOW_USER`|false|Always show the username, but conditionalize the hostname.|
+|`DEFAULT_USER`|None|Username to consider a "default context" (you can also set it to `$USER`).|
+|`POWERLEVEL9K_ALWAYS_SHOW_USER`|false|Always show the username.|
|`POWERLEVEL9K_USER_TEMPLATE`|%n|Default username prompt (username). Refer to the [ZSH Documentation](http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html) for all possible expansions|
##### vcs
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 20bc9d2b..caa42fde 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -611,7 +611,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" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
+ if [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]]; then
if [[ $(print -P "%#") == '#' ]]; then
user_state=(
"STATE" "ROOT"
@@ -629,8 +629,8 @@ prompt_user() {
"VISUAL_IDENTIFIER" "USER_ICON"
)
fi
+ "$1_prompt_segment" "${0}_${user_state[STATE]}" "$2" "${user_state[BACKGROUND_COLOR]}" "${user_state[FOREGROUND_COLOR]}" "${user_state[CONTENT]}" "${user_state[VISUAL_IDENTIFIER]}"
fi
- "$1_prompt_segment" "${0}_${user_state[STATE]}" "$2" "${user_state[BACKGROUND_COLOR]}" "${user_state[FOREGROUND_COLOR]}" "${user_state[CONTENT]}" "${user_state[VISUAL_IDENTIFIER]}"
}
################################################################