nixconf/modules/home/core/fish_prompt.fish
Bailey cef22c702a Adds subshell to fish prompt.
Also removes date, was sometimes misleading.
2024-03-18 17:02:58 -04:00

24 lines
707 B
Fish

set last_status $status
set -l fish_color_status (set_color green)
test $last_status -eq 0; or set -l fish_color_status (set_color red)
set -l normal (set_color normal)
set -l suffix '>'
if functions -q fish_is_root_user; and fish_is_root_user
set suffix '#'
end
set -l prompt_status $fish_color_status (string pad -w 3 $last_status) $normal
set -l divider (set_color blue) ' ~~ ' $normal
set -x __fish_git_prompt_show_informative_status yes
set -l prompt_nix_shell ''
test $SHLVL != 0; and set -l prompt_subshell ' +'(math $SHLVL - 1)' '
echo
echo -s '[' $prompt_status '] ' (prompt_hostname) $divider (set_color cyan) (prompt_pwd) $divider (fish_vcs_prompt ' ' )
echo -s -n $suffix $normal ' '