From 3b2e847fcc81655ede39c450a240c02528de66aa Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Fri, 29 Mar 2019 05:13:12 +0100 Subject: [PATCH] Fix status reporting (#197) The status needs to be saved before anything else is done, otherwise it will get overwritten. Since commit ac45a5cb9594 this was the case with the `if` block in a way that `last_status` was always `0`. --- fish_prompt.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fish_prompt.fish b/fish_prompt.fish index 20dc72a..4150ab3 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -969,15 +969,15 @@ end # ============================== function fish_prompt -d 'bobthefish, a fish theme optimized for awesome' + # Save the last status for later (do this before anything else) + set -l last_status $status + # Use a simple prompt on dumb terminals. if [ "$TERM" = "dumb" ] echo "> " return end - # Save the last status for later (do this before the `set` calls below) - set -l last_status $status - __bobthefish_glyphs __bobthefish_colors $theme_color_scheme