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.
This commit is contained in:
Hector Sanjuan 2017-06-22 13:00:51 +02:00 committed by Fabian Homborg
parent e26f7aacc4
commit 2d42baac35

View file

@ -4,6 +4,8 @@
function fish_prompt --description 'Write out the prompt' function fish_prompt --description 'Write out the prompt'
set -l last_status $status
if not set -q __fish_git_prompt_show_informative_status if not set -q __fish_git_prompt_show_informative_status
set -g __fish_git_prompt_show_informative_status 1 set -g __fish_git_prompt_show_informative_status 1
end end
@ -59,8 +61,6 @@ function fish_prompt --description 'Write out the prompt'
set -g __fish_git_prompt_color_cleanstate green --bold set -g __fish_git_prompt_color_cleanstate green --bold
end end
set -l last_status $status
if not set -q __fish_prompt_normal if not set -q __fish_prompt_normal
set -g __fish_prompt_normal (set_color normal) set -g __fish_prompt_normal (set_color normal)
end end