mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-04-24 17:12:19 +02:00
context: fixing conditionals in for always showing $USER
This commit is contained in:
parent
6512796afe
commit
c65e3217b5
@ -550,7 +550,7 @@ prompt_context() {
|
|||||||
|
|
||||||
local content=""
|
local content=""
|
||||||
|
|
||||||
if [[ "POWERLEVEL9K_ALWAYS_SHOW_CONTEXT" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
|
if [[ "$POWERLEVEL9K_ALWAYS_SHOW_CONTEXT" == true ]] || [[ "$USER" != "$DEFAULT_USER" ]] || [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
|
||||||
|
|
||||||
if [[ $(print -P "%#") == '#' ]]; then
|
if [[ $(print -P "%#") == '#' ]]; then
|
||||||
current_state="ROOT"
|
current_state="ROOT"
|
||||||
@ -558,7 +558,7 @@ prompt_context() {
|
|||||||
|
|
||||||
content="$USER@${POWERLEVEL9K_CONTEXT_HOST_DEPTH}"
|
content="$USER@${POWERLEVEL9K_CONTEXT_HOST_DEPTH}"
|
||||||
|
|
||||||
elif [[ "POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]]; then
|
elif [[ "$POWERLEVEL9K_ALWAYS_SHOW_USER" == true ]]; then
|
||||||
content="$USER"
|
content="$USER"
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user