fish: Prettier jj right prompt

This commit is contained in:
Daniel Lundin 2024-11-19 16:48:04 +01:00
parent 74c622efab
commit 504cfd30ef
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI

View file

@ -101,10 +101,13 @@
end
# Generate prompt
jj log --ignore-working-copy --no-graph --color always -r @ -T '
jj log --ignore-working-copy --no-graph --color never -r @ -T '
surround(
" \e[2;3m",
"\e[0m",
separate(
" ",
change_id.shortest(),
bookmarks.join(", "),
coalesce(
surround(
"\"",
@ -115,16 +118,24 @@
description.first_line().substr(0, 23) ++ ""
)
),
"(no description set)"
""
),
bookmarks.join(", "),
surround(
"\e[0;1;35m",
"\e[0;2;3m",
change_id.shortest(),
),
surround(
"\e[0;34m",
"\e[0;2;3m",
commit_id.shortest(),
),
if(conflict, "(conflict)"),
if(empty, "(empty)"),
if(empty, ")"),
if(divergent, "(divergent)"),
if(hidden, "(hidden)"),
)
'
)
'';
fish_prompt.body = ''