fish: root prompt with #

This commit is contained in:
dogeystamp 2023-04-30 20:20:26 -04:00
parent 39c260a4ac
commit 646c43f8d7
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,7 @@
if test -z "$SYSTEM_PROFILE"
set -gx SYSTEM_PROFILE SLIM
end
source ~/.config/fish/aliases.fish
# Set GPG_TTY

View File

@ -41,5 +41,10 @@ function fish_right_prompt
(set_color normal)
end
function fish_prompt
printf '%s%s%s> ' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
if fish_is_root_user
set letter '#'
else
set letter '>'
end
printf '%s%s%s%s ' (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) $letter
end