From b8f704e3c4f5dbbe519192e8a84218f4be3498e5 Mon Sep 17 00:00:00 2001 From: Stevie Alvarez Date: Sun, 21 Sep 2025 16:21:01 -0700 Subject: [PATCH] fish_git_prompt: add diverged upstream char option Currently, `__fish_git_prompt_char_upstream_diverged` can only be set to a combination of `__fish_git_prompt_char_upstream_behind` and `__fish_git_prompt_char_upstream_ahead`s plain-text options. Adding a combination of the less-plain character options gives users more choice. Closes #11817 --- doc_src/cmds/fish_git_prompt.rst | 2 +- share/functions/fish_git_prompt.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_src/cmds/fish_git_prompt.rst b/doc_src/cmds/fish_git_prompt.rst index 5569b3797..7e1518d6a 100644 --- a/doc_src/cmds/fish_git_prompt.rst +++ b/doc_src/cmds/fish_git_prompt.rst @@ -110,7 +110,7 @@ Variables used with ``showupstream`` (also implied by informative status): - ``$__fish_git_prompt_char_upstream_ahead`` (>, ↑) - the character for the commits this repository is ahead of upstream - ``$__fish_git_prompt_char_upstream_behind`` (<, ↓) - the character for the commits this repository is behind upstream -- ``$__fish_git_prompt_char_upstream_diverged`` (<>) - the symbol if this repository is both ahead and behind upstream +- ``$__fish_git_prompt_char_upstream_diverged`` (<>, ↓↑) - the symbol if this repository is both ahead and behind upstream - ``$__fish_git_prompt_char_upstream_equal`` (=) - the symbol if this repo is equal to upstream - ``$__fish_git_prompt_char_upstream_prefix`` ('') - ``$__fish_git_prompt_color_upstream`` diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index f6056b5ee..e050dba09 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -586,7 +586,7 @@ function __fish_git_prompt_validate_chars --description "fish_git_prompt helper, __fish_git_prompt_set_char __fish_git_prompt_char_untrackedfiles '%' '…' __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_diverged '<>' '↓↑' __fish_git_prompt_set_char __fish_git_prompt_char_upstream_equal '=' __fish_git_prompt_set_char __fish_git_prompt_char_upstream_prefix ''