mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 17:28:46 +08:00
Sample prompts: Use fish_is_root_user
So we don't just check for "root"
This commit is contained in:
parent
2bc2a92c9a
commit
635a2c13f1
|
@ -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
|
||||
|
||||
|
|
|
@ -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)'❯ '
|
||||
|
|
Loading…
Reference in New Issue
Block a user