add $pipestatus to informative_vcs.fish prompt

This commit is contained in:
zabereer 2019-03-04 18:14:42 +00:00
parent d5c18350a7
commit 0923712e3e

View File

@ -4,6 +4,7 @@
function fish_prompt --description 'Write out the prompt'
set -l last_pipestatus $pipestatus
set -l last_status $status
if not set -q __fish_git_prompt_show_informative_status
@ -88,6 +89,9 @@ function fish_prompt --description 'Write out the prompt'
printf '%s ' (fish_vcs_prompt)
set -l pipestatus_string (__fish_print_pipestatus "[" "] " "|" (set_color yellow) (set_color --bold yellow) $last_pipestatus)
echo -n "$pipestatus_string"
if not test $last_status -eq 0
set_color $fish_color_error
echo -n "[$last_status] "