prompt: move status to the right in classic_status sample prompt

This is consistent with the other prompts that include status.

[ci skip]
This commit is contained in:
Johannes Altmanninger 2019-12-11 01:06:31 +01:00
parent 6902459566
commit d4a3b30b73

View File

@ -8,8 +8,6 @@ function fish_prompt --description "Write out the prompt"
set -q fish_color_status
or set -U fish_color_status red
__fish_print_pipestatus "[" "] " "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus
set -l color_cwd
set -l suffix
switch "$USER"
@ -25,5 +23,7 @@ function fish_prompt --description "Write out the prompt"
set suffix '>'
end
echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix "
echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) \
(__fish_print_pipestatus " [" "]" "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus) \
(set_color normal) "$suffix "
end