diff options
author | Dennis Eriksen <d@ennis.no> | 2023-01-11 20:37:46 +0100 |
---|---|---|
committer | Dennis Eriksen <d@ennis.no> | 2023-01-11 20:37:46 +0100 |
commit | 87448d68612ea374d4a0e57cdf86f36065057dda (patch) | |
tree | 14655b5cfefbc2b49a2f03644742d582934a8901 | |
parent | Making prompt more customizable. (diff) | |
download | adam3-87448d68612ea374d4a0e57cdf86f36065057dda.tar.gz |
show user@host when root
-rw-r--r-- | prompt_adam3_setup | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prompt_adam3_setup b/prompt_adam3_setup index 7bc255a..fb962b2 100644 --- a/prompt_adam3_setup +++ b/prompt_adam3_setup @@ -31,7 +31,7 @@ PROMPT_ADAM3_COLOR5=white # default prompt-color. Only takes a single color. PROMPT_ADAM3_TIME= # Set to 'false' if you don't want time on RPS1 PROMPT_ADAM3_AOUH= # Set to 'true' if you want "user@host" to show on # localhost. Else it will only be shown when on remote host - # (through ssh) + # (through ssh), or when you are root. PROMPT_ADAM3_PUSER='%n@' PROMPT_ADAM3_PHOST='%m' @@ -143,7 +143,7 @@ prompt_adam3_setup () { # Make each prompt-part global typeset -g PROMPT_ADAM3_PS1 - [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION || -n $PROMPT_ADAM3_AOUH ]] \ + [[ -n $SSH_CLIENT || -n $SSH_TTY || -n $SSH_CONNECTION || -n $PROMPT_ADAM3_AOUH || $UID == 0 ]] \ && PROMPT_ADAM3_PS1="$prom[user]$prom[host] " typeset -g PROMPT_ADAM3_SLM_DIR=$prom[dirS] typeset -g PROMPT_ADAM3_DLM_DIR=$prom[dirD] |