From 2d42baac35d2a7e533502438c85f0d6dc5ff4c87 Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Thu, 22 Jun 2017 13:00:51 +0200 Subject: [PATCH] Fix last status report (it's always 0) It seems something is overwriting the status before it is saved to a variable. Fixed by setting the last_status variable at the very beginning. --- share/tools/web_config/sample_prompts/informative_vcs.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/tools/web_config/sample_prompts/informative_vcs.fish b/share/tools/web_config/sample_prompts/informative_vcs.fish index d7419a495..f52ba355b 100644 --- a/share/tools/web_config/sample_prompts/informative_vcs.fish +++ b/share/tools/web_config/sample_prompts/informative_vcs.fish @@ -4,6 +4,8 @@ function fish_prompt --description 'Write out the prompt' + set -l last_status $status + if not set -q __fish_git_prompt_show_informative_status set -g __fish_git_prompt_show_informative_status 1 end @@ -59,8 +61,6 @@ function fish_prompt --description 'Write out the prompt' set -g __fish_git_prompt_color_cleanstate green --bold end - set -l last_status $status - if not set -q __fish_prompt_normal set -g __fish_prompt_normal (set_color normal) end