mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 14:54:23 +00:00
Change detections
This commit is contained in:
parent
84d68eeb4a
commit
78ef972de7
1 changed files with 6 additions and 7 deletions
|
@ -9,15 +9,12 @@ function fish_prompt
|
||||||
case "/root"
|
case "/root"
|
||||||
# Root
|
# Root
|
||||||
set_color brred
|
set_color brred
|
||||||
case "/srv/*"
|
|
||||||
# System account
|
|
||||||
set_color brpurple
|
|
||||||
case "/home/*"
|
case "/home/*"
|
||||||
# Regular user
|
# Regular user
|
||||||
set_color brgreen
|
set_color brgreen
|
||||||
case "*"
|
case "*"
|
||||||
# Temporary account
|
# Temporary account
|
||||||
set_color brcyan
|
set_color brpurple
|
||||||
end
|
end
|
||||||
echo -n "$USER"
|
echo -n "$USER"
|
||||||
|
|
||||||
|
@ -36,10 +33,12 @@ function fish_prompt
|
||||||
|
|
||||||
|
|
||||||
# Hostname
|
# Hostname
|
||||||
if test -z "$SSH_CLIENT"
|
if test -n "$SSH_CLIENT"
|
||||||
set_color green
|
|
||||||
else
|
|
||||||
set_color cyan
|
set_color cyan
|
||||||
|
else if test -n "$SUDO_COMMAND"
|
||||||
|
set_color purple
|
||||||
|
else
|
||||||
|
set_color green
|
||||||
end
|
end
|
||||||
|
|
||||||
echo -n (prompt_hostname)
|
echo -n (prompt_hostname)
|
||||||
|
|
Loading…
Reference in a new issue