-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
function _tide_item_jj | ||
if not command -sq jj; or not jj root --quiet &>/dev/null | ||
return 1 | ||
end | ||
|
||
set jj_status (jj log -r@ -n1 --ignore-working-copy --no-graph --color always -T ' | ||
separate(" ", | ||
bookmarks.map(|x| if( | ||
x.name().substr(0, 10).starts_with(x.name()), | ||
x.name().substr(0, 10), | ||
x.name().substr(0, 9) ++ "…") | ||
).join(" "), | ||
tags.map(|x| if( | ||
x.name().substr(0, 10).starts_with(x.name()), | ||
x.name().substr(0, 10), | ||
x.name().substr(0, 9) ++ "…") | ||
).join(" "), | ||
surround("\"","\"", | ||
if( | ||
description.first_line().substr(0, 24).starts_with(description.first_line()), | ||
description.first_line().substr(0, 24), | ||
description.first_line().substr(0, 23) ++ "…" | ||
) | ||
), | ||
change_id.shortest(), | ||
commit_id.shortest(), | ||
if(conflict, "conflict"), | ||
if(divergent, "divergent"), | ||
if(hidden, "hidden"), | ||
)' | string trim) | ||
set jj_info $jj_status | ||
_tide_print_item jj $tide_jj_icon' ' "($(string join ', ' $jj_info))" | ||
end |