fish_git_prompt: Add a way to use the informative chars

$__fish_git_prompt_use_informative_chars will use the informative
chars without requiring informative mode (which is really frickin'
slow!).

See #5726.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-06-25 15:06:26 +02:00
parent caedf01c00
commit 427a18c1ea
3 changed files with 6 additions and 3 deletions

View File

@ -56,6 +56,7 @@
- `bosh`
- `vagrant`
- The git prompt in informative mode now shows the number of stashes if enabled.
- The git prompt now has an option ($__fish_git_prompt_use_informative_chars) to use the (more modern) informative characters without enabling informative mode.
- The nextd and prevd functions no longer print "Hit end of history", instead using a BEL.
- If fish_mode_prompt exists, vi-mode will only execute it on mode-switch instead of the entire prompt. This should make it much more responsive with slow prompts (#5783).
- The path-component bindings (like ctrl-w) now also stop at ":" and "@" because those are used to denote user and host in ssh-likes (#5841).

View File

@ -689,7 +689,9 @@ function __fish_git_prompt_set_char
end
if set -q argv[3]
and set -q __fish_git_prompt_show_informative_status
and begin set -q __fish_git_prompt_show_informative_status
or set -q __fish_git_prompt_use_informative_chars
end
set char $argv[3]
end
@ -792,7 +794,7 @@ function __fish_git_prompt_validate_colors --description "fish_git_prompt helper
end
set -l varargs
for var in repaint describe_style show_informative_status showdirtystate showstashstate showuntrackedfiles showupstream
for var in repaint describe_style show_informative_status use_informative_chars showdirtystate showstashstate showuntrackedfiles showupstream
set -a varargs --on-variable __fish_git_prompt_$var
end
function __fish_git_prompt_repaint $varargs --description "Event handler, repaints prompt when functionality changes"

View File

@ -50,7 +50,7 @@ There are numerous customization options, which can be controlled with git optio
- ``$__fish_git_prompt_showcolorhints`` can be set to enable coloring for the branch name and status symbols.
A number of variables set characters and color used as indicators. Many of these have a different default if used with informative status enabled. The usual default is given first, then the informative default (if it is different). If no default for the colors is given, they default to ``$__fish_git_prompt_color``.
A number of variables set characters and color used as indicators. Many of these have a different default if used with informative status enabled, or ``$__fish_git_prompt_use_informative_chars`` set. The usual default is given first, then the informative default (if it is different). If no default for the colors is given, they default to ``$__fish_git_prompt_color``.
- ``$__fish_git_prompt_char_stateseparator`` (' ', `|`)
- ``$__fish_git_prompt_color`` ('')