From 87448d68612ea374d4a0e57cdf86f36065057dda Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Wed, 11 Jan 2023 20:37:46 +0100 Subject: show user@host when root --- prompt_adam3_setup | 4 ++-- 1 file 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] -- cgit v1.2.3