2024-01-18 01:32:15 +00:00
|
|
|
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)
|
|
|
|
|
2024-03-18 20:24:07 +00:00
|
|
|
set -l suffix '>'
|
2024-01-18 01:32:15 +00:00
|
|
|
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 ''
|
2024-03-18 22:07:31 +00:00
|
|
|
test $SHLVL -gt 1; and set -l prompt_subshell '+'(math $SHLVL - 1)' '
|
2024-01-18 01:32:15 +00:00
|
|
|
|
|
|
|
echo
|
2024-03-18 22:07:31 +00:00
|
|
|
echo -s '[' $prompt_status '] ' $prompt_subshell (prompt_hostname) $divider (set_color cyan) (prompt_pwd) $divider (fish_vcs_prompt ' ' )
|
2024-01-18 01:32:15 +00:00
|
|
|
echo -s -n $suffix $normal ' '
|