Skip to content

Commit

Permalink
Use more portable uname -n rather than hostname.
Browse files Browse the repository at this point in the history
Fixes #312
  • Loading branch information
bobthecow committed Nov 5, 2021
1 parent 626bd39 commit 332f23a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion functions/fish_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ end
# Polyfill for fish < 2.5.0
if not type -q prompt_hostname
if not set -q __bobthefish_prompt_hostname
set -g __bobthefish_prompt_hostname (hostname | string replace -r '\..*' '')
set -g __bobthefish_prompt_hostname (uname -n | string replace -r '\..*' '')
end

function prompt_hostname
Expand Down
2 changes: 1 addition & 1 deletion functions/fish_title.fish
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function __bobthefish_title_user -S -d 'Display actual user if different from $d
if [ "$theme_title_display_user" = 'yes' ]
if [ "$USER" != "$default_user" -o -n "$SSH_CLIENT" ]
set -l IFS .
hostname | read -l hostname __
uname -n | read -l hostname __
echo -ns (whoami) '@' $hostname ' '
end
end
Expand Down

0 comments on commit 332f23a

Please sign in to comment.