mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 06:44:22 +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"
|
||||
# Root
|
||||
set_color brred
|
||||
case "/srv/*"
|
||||
# System account
|
||||
set_color brpurple
|
||||
case "/home/*"
|
||||
# Regular user
|
||||
set_color brgreen
|
||||
case "*"
|
||||
# Temporary account
|
||||
set_color brcyan
|
||||
set_color brpurple
|
||||
end
|
||||
echo -n "$USER"
|
||||
|
||||
|
@ -36,10 +33,12 @@ function fish_prompt
|
|||
|
||||
|
||||
# Hostname
|
||||
if test -z "$SSH_CLIENT"
|
||||
set_color green
|
||||
else
|
||||
if test -n "$SSH_CLIENT"
|
||||
set_color cyan
|
||||
else if test -n "$SUDO_COMMAND"
|
||||
set_color purple
|
||||
else
|
||||
set_color green
|
||||
end
|
||||
|
||||
echo -n (prompt_hostname)
|
||||
|
|
Loading…
Reference in a new issue