fish_git_prompt: Add separator even if state is empty

This would leave off the separator if the repo was just bare or had
upstream difference, but no status (e.g. dirty) applied.

Fixes #10175
This commit is contained in:
Fabian Boehm 2023-12-30 10:09:37 +01:00
parent 7d10a72bb3
commit 4c1e25b141

View File

@ -388,7 +388,9 @@ function fish_git_prompt --description "Prompt function for Git"
end
# Formatting
if test -n "$f"
# If we have state, a bare repo or upstream difference, add a separator.
# merging is already separate.
if test -n "$f$c$p"
set f "$space$f"
end
set -l format $argv[1]