__fish_git_prompt: initialise colors early

Otherwise __fish_git_prompt_informative_status tries to expand an unset
variable.

Closes #1157.
This commit is contained in:
David Adam 2013-12-02 20:09:15 +08:00
parent 7db755dd68
commit f0946baeaa

View file

@ -371,6 +371,7 @@ function __fish_git_prompt --description "Prompt function for Git"
set -l informative_status
__fish_git_prompt_validate_chars
__fish_git_prompt_validate_colors
if test "true" = $inside_worktree
if test -n "$__fish_git_prompt_show_informative_status"
@ -403,8 +404,6 @@ function __fish_git_prompt --description "Prompt function for Git"
end
end
__fish_git_prompt_validate_colors
set -l branch_color $___fish_git_prompt_color_branch
set -l branch_done $___fish_git_prompt_color_branch_done
if test -n "$__fish_git_prompt_showcolorhints"