diff --git a/share/functions/fish_jj_prompt.fish b/share/functions/fish_jj_prompt.fish index 288f4f753..b65f103ed 100644 --- a/share/functions/fish_jj_prompt.fish +++ b/share/functions/fish_jj_prompt.fish @@ -4,16 +4,18 @@ function fish_jj_prompt if not command -sq jj return 1 end - jj log 2>/dev/null --no-graph --ignore-working-copy --color=always --revisions @ \ - --template ' - concat( - " ", + set -l info "$( + jj log 2>/dev/null --no-graph --ignore-working-copy --color=always --revisions @ \ + --template ' separate(" ", - format_short_change_id_with_hidden_and_divergent_info(self), bookmarks, tags, if(conflict, label("conflict", "×")), if(empty, label("empty", "(empty)")) - ), - )' + ) + ' + )" + if test -n $info + printf ' %s' $info + end end