Size: 462
Comment: Fix formatting.
|
Size: 1075
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 6: | Line 6: |
=== Handling aliases === It [[https://github.com/git/git/blob/master/builtin/diff.c#L367|looks like]] git just hard-codes which commands use the pager. We could probably do something similar by having a paged context manager on ui, eg: {{{ with ui.paged: # all ui prints here go to the pager }}} or we could have a function to page the output, since I [augie] think that starting the pager isn't reversible: {{{ ui.pager() # all subsequent output goes to the pager }}} That'd solve the problem of [alias] entries not getting paged. ---- CategoryDeveloper CategoryNewFeatures |
We think we'd like some sort of automatic pager support in core and on by default. This page exists to (roughly) document problems with the existing pager support, so we can outline a path to a real solution:
- Pager only applies to a handful of whitelisted commands, and aliases using those commands don't get paged
What should the default pager configuration be?
Probably less, and probably set LESS=FSRX if LESS isn't already set?
Handling aliases
It looks like git just hard-codes which commands use the pager. We could probably do something similar by having a paged context manager on ui, eg:
with ui.paged: # all ui prints here go to the pager
or we could have a function to page the output, since I [augie] think that starting the pager isn't reversible:
ui.pager() # all subsequent output goes to the pager
That'd solve the problem of [alias] entries not getting paged.