diff --git a/fish_prompt.fish b/fish_prompt.fish index 93025fd..a0a63ae 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -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)