[fish] Remove $CLIENT, display machine name instead.

This commit is contained in:
Sebastian Schulze 2016-02-16 14:53:26 +01:00
parent dbd3bba1d2
commit b1f5bc0930
1 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,10 @@
function fish_prompt
# Just calculate this once, to save a few cycles when displaying the prompt
# (Stolen from vendor fish_prompt())
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
switch (hostname -s)
case tdhtest
set logo "🐮"
@ -8,9 +14,7 @@ function fish_prompt
set logo "?"
end
if not [ -z $CLIENT ]
echo -n "[$CLIENT] "
end
echo -n "[$__fish_prompt_hostname] "
set_color blue
echo -n $logo (pwd)