diff options
author | ache <ache@ache.one> | 2021-09-16 06:22:07 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2021-09-16 06:22:07 +0200 |
commit | 0dbd6d553796c263ca1c7ff919ed54387a39a2e1 (patch) | |
tree | f72e1817fe958d13006fda030829a36fe952f586 /functions/fish_prompt.fish | |
parent | Set android home (diff) |
force prompt hostname on root
Diffstat (limited to 'functions/fish_prompt.fish')
-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 |