mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-28 12:45:13 +00:00
723943fd1f
That means we go on to try git etc
22 lines
640 B
Fish
22 lines
640 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)"))
|
||
)
|
||
'
|
||
)"
|
||
or return 1
|
||
if test -n "$info"
|
||
printf ' %s' $info
|
||
end
|
||
end
|