File tree 1 file changed +34
-0
lines changed 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ function _tide_item_jj
2
+ if not command -sq jj; or not jj root --quiet & > /dev/null
3
+ return 1
4
+ end
5
+
6
+ set jj_status (jj log -r @ -n1 --ignore-working-copy --no-graph --color always -T '
7
+ separate(" ",
8
+ branches.map(|x| if(
9
+ x.name().substr(0, 10).starts_with(x.name()),
10
+ x.name().substr(0, 10),
11
+ x.name().substr(0, 9) ++ "…")
12
+ ).join(" "),
13
+ tags.map(|x| if(
14
+ x.name().substr(0, 10).starts_with(x.name()),
15
+ x.name().substr(0, 10),
16
+ x.name().substr(0, 9) ++ "…")
17
+ ).join(" "),
18
+ surround("\ "","\ "",
19
+ if(
20
+ description.first_line().substr(0, 24).starts_with(description.first_line()),
21
+ description.first_line().substr(0, 24),
22
+ description.first_line().substr(0, 23) ++ "…"
23
+ )
24
+ ),
25
+ change_id.shortest(),
26
+ commit_id.shortest(),
27
+ if(conflict, "conflict"),
28
+ if(divergent, "divergent"),
29
+ if(hidden, "hidden"),
30
+ )
31
+ ' | string trim)
32
+ set jj_info $jj_status
33
+ _tide_print_item jj $tide_jj_icon ' ' " ($(string join ', ' $jj_info ))"
34
+ end
You can’t perform that action at this time.
0 commit comments