Files
fish-shell/share/functions/fish_jj_prompt.fish
Johannes Altmanninger 123b262e97 fish_jj_prompt: remove not-so-useful bits
Things like branch and tag name can take up a lot of space on the screen. The
empty status may be useful but we're still looking for evidence.  For now let's
keep only the conflict status, which is fairly familiar from the Git prompt.

See also #11183
2025-04-16 11:24:33 +02:00

20 lines
526 B
Fish
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
function fish_jj_prompt
# If jj isn't installed, there's nothing we can do
# Return 1 so the calling prompt can deal with it
if not command -sq jj
return 1
end
set -l info "$(
jj log 2>/dev/null --no-graph --ignore-working-copy --color=always --revisions @ \
--template '
separate(" ",
if(conflict, label("conflict", "×")),
)
'
)"
or return 1
if test -n "$info"
printf ' %s' $info
end
end