mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Switch prompt_hostname over to $hostname
This commit is contained in:
parent
a756049dac
commit
410f6fbd44
1 changed files with 1 additions and 8 deletions
|
@ -1,10 +1,3 @@
|
|||
# Fetching the host name can be expensive if there is a problem with DNS or whatever subsystem the
|
||||
# hostname command uses. So cache the answer so including it in the prompt doesn't make fish seem
|
||||
# slow.
|
||||
if not set -q __fish_prompt_hostname
|
||||
set -g __fish_prompt_hostname (hostname | string split '.')[1]
|
||||
end
|
||||
|
||||
function prompt_hostname
|
||||
echo $__fish_prompt_hostname
|
||||
echo $hostname;
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue