Skip to content

Commit 332f23a

Browse files
committed
Use more portable uname -n rather than hostname.
Fixes #312
1 parent 626bd39 commit 332f23a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

functions/fish_prompt.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ end
690690
# Polyfill for fish < 2.5.0
691691
if not type -q prompt_hostname
692692
if not set -q __bobthefish_prompt_hostname
693-
set -g __bobthefish_prompt_hostname (hostname | string replace -r '\..*' '')
693+
set -g __bobthefish_prompt_hostname (uname -n | string replace -r '\..*' '')
694694
end
695695

696696
function prompt_hostname

functions/fish_title.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function __bobthefish_title_user -S -d 'Display actual user if different from $d
88
if [ "$theme_title_display_user" = 'yes' ]
99
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
1010
set -l IFS .
11-
hostname | read -l hostname __
11+
uname -n | read -l hostname __
1212
echo -ns (whoami) '@' $hostname ' '
1313
end
1414
end

0 commit comments

Comments
 (0)