red user and hostname for root sessions
This commit is contained in:
parent
9e11d79a1a
commit
2ce2815a4c
1 changed files with 7 additions and 2 deletions
|
@ -1,7 +1,12 @@
|
|||
function fish_prompt
|
||||
set user (set_color --bold cyan)(whoami)(set_color normal)
|
||||
if [ $USER = "root" ]
|
||||
set user (set_color --bold red)(whoami)(set_color normal)
|
||||
set machine (set_color --bold red)(hostname| cut -d . -f 1)(set_color normal)
|
||||
else
|
||||
set user (set_color --bold cyan)(whoami)(set_color normal)
|
||||
set machine (set_color --bold blue)(hostname| cut -d . -f 1)(set_color normal)
|
||||
end
|
||||
|
||||
set machine (set_color --bold blue)(hostname| cut -d . -f 1)(set_color normal)
|
||||
|
||||
set -l realhome ~
|
||||
set directory (set_color --bold green)(echo $PWD | sed -e "s|^$realhome|~|")(set_color normal)
|
||||
|
|
Loading…
Reference in a new issue