Replies: 2 comments 1 reply
-
The For example, the defaults for formatting operations based on looking at the above template are template-aliases."format_operation_oneline(op)" = '''
separate(" ",
format_short_operation_id(op.id()), op.user(), format_time_range(op.time()),
op.description().first_line(),
if(op.tags(), op.tags()),
) ++ "\n"
'''
template-aliases."format_snapshot_operation_oneline(op)" = 'format_operation_oneline(op)' Based on that, the time range is rendered using template-aliases."format_time_range(time_range)" = '''
time_range.end().ago() ++ label("time", ", lasted ") ++ time_range.duration()''' You can customize this to your liking by overriding the specific function. You can add a modified version of this alias to your config file, or even add the configuration on a per command basis, e.g. something like the following:
(I usually do this to test out various changes before adding the final version to my config.) You can also want to write your own templates without depending on any of these defaults if you think the defaults aren't suitable for you. |
Beta Was this translation helpful? Give feedback.
-
There is detailed info on timestamps here: E.g. this gives just absolute stamps:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
jj op log
shows me a bazillion changes with the timestamp1 day ago
. This really doesn't help me to find "that thing I did just after lunch yesterday".How can I override a single component used in a template? In this example, that would be the timestamp.
jj config list --include-defaults | rg -A 10 builtin_op_log
(is there a better approach?) shows me thatWhat would be an efficient way to drill down to discover the relevant component?
Once found, how could I override it?
Can it be overridden on the CLI, or would it require modifying the config file?
Beta Was this translation helpful? Give feedback.
All reactions