-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: make pager configurable per command #5311
base: main
Are you sure you want to change the base?
Conversation
Allow `ui.pager` to be set as a table like so: [ui] pager.status = ":none" pager.log = { command = ["less", "-FRX"], env = { LESSCHARSET = "utf-8" } } pager.diff = ["delta", "..."] pager.default = "..." `ui.pager.log` is used for `jj log`, `ui.pager.diff` for `jj diff`, etc. The full name of the highest level subcommand is used, i.e. `jj operation diff` uses `ui.pager.operation`. The value ":none" disables paging for the selected command. If a command is not specifically mentioned, the value of `ui.pager.default` is used. The old behaviour is unchanged, i.e. `ui.pager = ["less", "-FRX"]` will set the pager for all subcommands.
Unsure how to update Also unsure if / where there are tests for pagers. I was unable to find any on a cursory glance. |
I think it's better to not overuse [ui]
paginate = "auto" # default
pager = "..." # default
[<table-for-per-command-pager-options>]
status.paginate = "never"
diff.pager = ["delta", "..."]
# or generic per-command table like this?
[commands.status]
ui.paginate = "never"
# or extend the conditional table?
[[--scope]]
--when.commands = ["status"]
ui.paginate = "never"
I think "file show" and "file list" are quite different, and the user might want to enable pager only for one of them. |
I'm intrigued by extending the The rule for Currently, |
or
|
Closes #5217
Allow
ui.pager
to be set as a table like so:ui.pager.log
is used forjj log
,ui.pager.diff
forjj diff
, etc. The full name of the highest level subcommand is used, i.e.jj operation diff
usesui.pager.operation
. The value ":none" disables paging for the selected command. If a command is not specifically mentioned, the value ofui.pager.default
is used.The old behaviour is unchanged, i.e.
ui.pager = ["less", "-FRX"]
will set the pager for all subcommands.Checklist
If applicable:
CHANGELOG.md