mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
updated render check logic
This commit is contained in:
parent
61790bf242
commit
cf806f097b
1 changed files with 2 additions and 2 deletions
|
@ -574,7 +574,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"
|
||||
|
@ -592,8 +592,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]}"
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
|
Loading…
Reference in a new issue