From c8cf06b5d5ff50ca990b760ae67f0d1cc937ec07 Mon Sep 17 00:00:00 2001 From: ache Date: Thu, 5 Mar 2026 12:01:37 +0100 Subject: fix: Switch hostname strategy --- functions/fish_prompt.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'functions') diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 4fbdf34..2594b95 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -146,10 +146,10 @@ end 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" -o "$USER" = root \) \) ] - if type hostnamectl 2>/dev/null >/dev/null - set -g HOSTNAME_PROMPT (hostnamectl hostname) - else if type hostname 2/dev/null + if type hostname 2/dev/null set -g HOSTNAME_PROMPT (hostname) + else if type hostnamectl 2>/dev/null >/dev/null + set -g HOSTNAME_PROMPT (hostnamectl hostname) else set -g HOSTNAME_PROMPT (cat /etc/hostname) end -- cgit v1.3-2-g11bf