mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 18:30:20 +08:00
add $pipestatus
to informative_vcs.fish prompt
This commit is contained in:
parent
d5c18350a7
commit
0923712e3e
|
@ -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] "
|
||||
|
|
Loading…
Reference in New Issue
Block a user