1
Fork 0
mirror of https://github.com/Steffo99/config-fish.git synced 2024-12-22 14:54:23 +00:00

Fix fish prompt

This commit is contained in:
Steffo 2021-09-30 23:51:15 +02:00
parent 2d0afe54a7
commit db8f37bdb6
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -36,11 +36,21 @@ function fish_prompt
# Hostname # Hostname
if test -z "$SSH_CLIENT" set -g CURRENT_IP (who am i | awk '{print $5}')
set_color green
else if test -z "$CURRENT_IP"
set_color cyan # Experiment
set -g CURRENT_IP (who | grep "$USER" | awk '{print $5}')
end end
if test "$CURRENT_IP" "=" "(:0)"
set_color green
else if test -n "$SSH_CLIENT"
set_color cyan
else
set_color magenta
end
echo -n (prompt_hostname) echo -n (prompt_hostname)