mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 07:34:32 +00:00
git-prompt: Ensure repaint on all char and color changes
A few characters and colors got added without being added to the event list for repainting. Also sort and re-align list of characters in validate_chars.
This commit is contained in:
parent
6faeb71770
commit
c82dbaca8b
1 changed files with 15 additions and 14 deletions
|
@ -567,15 +567,15 @@ function __fish_git_prompt_validate_chars --description "__fish_git_prompt helpe
|
|||
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_cleanstate '.'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_dirtystate '*'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_stagedstate '+'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_invalidstate '#'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_stagedstate '+'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_stashstate '$'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_stateseparator ' '
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_untrackedfiles '%'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_equal '='
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_behind '<'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_ahead '>'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_behind '<'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_diverged '<>'
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_equal '='
|
||||
__fish_git_prompt_set_char __fish_git_prompt_char_upstream_prefix ' '
|
||||
|
||||
end
|
||||
|
@ -670,7 +670,7 @@ function __fish_git_prompt_repaint $varargs --description "Event handler, repain
|
|||
end
|
||||
|
||||
set -l varargs
|
||||
for var in '' _prefix _suffix _bare _merging _branch _dirtystate _stagedstate _invalidstate _stashstate _untrackedfiles _upstream _flags
|
||||
for var in '' _prefix _suffix _bare _merging _cleanstate _invalidstate _upstream _flags _branch _dirtystate _stagedstate _branch_detached _stashstate _untrackedfiles
|
||||
set varargs $varargs --on-variable __fish_git_prompt_color$var
|
||||
end
|
||||
set varargs $varargs --on-variable __fish_git_prompt_showcolorhints
|
||||
|
@ -689,8 +689,9 @@ function __fish_git_prompt_repaint_color $varargs --description "Event handler,
|
|||
commandline -f repaint ^/dev/null
|
||||
end
|
||||
end
|
||||
|
||||
set -l varargs
|
||||
for var in dirtystate stagedstate invalidstate stashstate untrackedfiles upstream_equal upstream_behind upstream_ahead upstream_diverged stateseparator
|
||||
for var in cleanstate dirtystate invalidstate stagedstate stashstate stateseparator untrackedfiles upstream_ahead upstream_behind upstream_diverged upstream_equal upstream_prefix
|
||||
set varargs $varargs --on-variable __fish_git_prompt_char_$var
|
||||
end
|
||||
function __fish_git_prompt_repaint_char $varargs --description "Event handler, repaints prompt when any char changes"
|
||||
|
|
Loading…
Reference in a new issue