commit 8ebfb19506d5d995696d79be099dfb107254cf63
parent 2a445281e331b568ddc30270ece04d5a92e01be5
Author: Chris Bracken <chris@bracken.jp>
Date: Fri, 14 Nov 2025 15:08:47 +0900
jj: add lol (log one line) alias
This outputs roughly the same content as the default `log` command, but
in a more compact, single-line form.
Diffstat:
1 file changed, 26 insertions(+), 0 deletions(-)
diff --git a/.config/jj/config.toml b/.config/jj/config.toml
@@ -6,3 +6,29 @@ email = "chris@bracken.jp"
[aliases]
l = ["log"]
+lol = ["log", "-T", "fmt_lol"]
+
+[colors]
+"committer timestamp" = "cyan"
+"working_copy committer timestamp" = "bright cyan"
+
+[template-aliases]
+# 1. Define the content format
+fmt_lol_content = '''
+change_id.shortest(8) ++ " " ++
+commit_id.shortest(8) ++ " " ++
+label("timestamp", committer.timestamp().local().format("%Y-%m-%d %H:%M:%S")) ++ " " ++
+label("author", author.name()) ++ " " ++
+separate(" ",
+ bookmarks,
+ tags,
+ if(git_head, label("git_head", "git_head()")),
+ if(empty, label("empty", "(empty)")),
+ if(description,
+ description.first_line(),
+ label("description placeholder", "(no description set)")
+ )
+)
+'''
+# 2. Wrap the content in the "working_copy" label if applicable
+fmt_lol = 'if(current_working_copy, label("working_copy", fmt_lol_content), fmt_lol_content)'