mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 14:54:23 +00:00
Display hostname in magenta if current host cannot be determined
This commit is contained in:
parent
061c7a6b4c
commit
7208fd2409
1 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,10 @@ function fish_prompt
|
|||
|
||||
|
||||
# Hostname
|
||||
if test (who am i | awk '{print $5}') = "(:0)"
|
||||
set -g CURRENT_IP (who am i | awk '{print $5}')
|
||||
if test -z "$CURRENT_IP"
|
||||
set_color magenta
|
||||
else if test "$CURRENT_IP" "=" "(:0)"
|
||||
set_color green
|
||||
else
|
||||
set_color cyan
|
||||
|
|
Loading…
Reference in a new issue