-
Notifications
You must be signed in to change notification settings - Fork 420
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
FR: jj log respect the diff pager config #4142
Comments
iirc, |
You could also try using |
Thanks for all these hint❤️, though indeed
Anyway, maybe it's the time to try |
Prior to this change, running `jj log` (where the results are large enough to need a pager) would leverage `delta` as a pager (which internally uses `less`). Without `delta`, `jj` invokes `less -FRX`. Importantly, that `-X` means "preserve the view" when you quit the pager. However, when you have `pager="delta"` configured delta is internally calling `less` and does not pass `-X` option. This means that the `jj log` output is _cleared_ from the terminal when `less` exits. This is pretty frustrating because the most common workflow for me is to use `jj log` to determine the changeset id that I need to rebase, squash, etc into and when the output is cleared I just have to "remember" it (which I get wrong often). This change leverages a feature of jj@0.26.0 which allows `--scope` to use `--when.command` to limit whatever configuration settings to a specific `jj` subcommand. In this case, I am only configuring `ui.pager` and `ui.diff.format` for the `jj diff` subcommand. This preserves the (massively better) delta diff output, but allows for the better `jj log` experience (leaving the last view on screen). One thing to note is that `jj log` does support `-p` flag to show the diff. At the moment, `-p` does not actually use the configured `pager` anyways, but in the future if it does I may need to figure out how to tweak this config to also apply to `jj log -p` as well (keep an eye on jj-vcs/jj#4142 for that).
Is your feature request related to a problem? Please describe.
I config the jj diff pager to be
delta
, and it works like a charm forjj diff
. However, when I usejj log -p file
, it starts to print the patch in git style without usingdelta
as pager.Describe the solution you'd like
I'd like that
jj log
can respect the diff pager config.The text was updated successfully, but these errors were encountered: