diff options
Diffstat (limited to 'functions')
-rw-r--r-- | functions/fish_prompt.fish | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index da5f604..ffd7da2 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -103,9 +103,9 @@ function prompt_user -d "Display current user if different from $default_user" end end -function get_hostname -d "Set current hostname to prompt variable $HOSTNAME_PROMPT if connected via SSH" +function get_hostname -d "Set current hostname to prompt variable $HOSTNAME_PROMPT if connected via SSH or is root" set -g HOSTNAME_PROMPT "" - if [ "$theme_hostname" = "always" -o \( "$theme_hostname" != "never" -a -n "$SSH_CLIENT" \) ] + if [ "$theme_hostname" = "always" -o \( "$theme_hostname" != "never" -a \( -n "$SSH_CLIENT" -o "$USER" = "root" \) \) ] set -g HOSTNAME_PROMPT (hostname) end end |