Sample prompts: Use fish_is_root_user

So we don't just check for "root"
This commit is contained in:
Fabian Homborg 2021-04-01 14:15:10 +02:00
parent 2bc2a92c9a
commit 635a2c13f1
2 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ function fish_prompt
end
set -l arrow "$arrow_color"
if test "$USER" = root
if fish_is_root_user
set arrow "$arrow_color# "
end

View File

@ -13,7 +13,7 @@ function fish_prompt
echo -n (set_color blue)(prompt_pwd)' '
set_color -o
if test "$USER" = root
if fish_is_root_user
echo -n (set_color red)'# '
end
echo -n (set_color red)''(set_color yellow)''(set_color green)' '