From 4c1e25b1419bc6a5274588258ff3ba6e978fe286 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Sat, 30 Dec 2023 10:09:37 +0100 Subject: [PATCH] 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 --- share/functions/fish_git_prompt.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/functions/fish_git_prompt.fish b/share/functions/fish_git_prompt.fish index 1dcdeda1c..42d338ce7 100644 --- a/share/functions/fish_git_prompt.fish +++ b/share/functions/fish_git_prompt.fish @@ -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]