From 0923712e3e243cd9e67e9138df7a3e0e611b674b Mon Sep 17 00:00:00 2001 From: zabereer Date: Mon, 4 Mar 2019 18:14:42 +0000 Subject: [PATCH] add `$pipestatus` to informative_vcs.fish prompt --- share/tools/web_config/sample_prompts/informative_vcs.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/tools/web_config/sample_prompts/informative_vcs.fish b/share/tools/web_config/sample_prompts/informative_vcs.fish index a9eeeace8..99645fdaa 100644 --- a/share/tools/web_config/sample_prompts/informative_vcs.fish +++ b/share/tools/web_config/sample_prompts/informative_vcs.fish @@ -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] "