fish-shell/share/functions/fish_jj_prompt.fish
Johannes Altmanninger 0f4e195819 fish_jj_prompt: remove change ID
This is not really helpful because it's somewhat transient; also we
can usually use the @ alias.
2025-01-13 09:47:34 +01:00

22 lines
622 B
Fish

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(" ",
bookmarks,
tags,
if(conflict, label("conflict", "×")),
if(empty, label("empty", "(empty)"))
)
'
)"
if test -n $info
printf ' %s' $info
end
end