The sound distributed version control system

#665 Allow users to disable pager

Opened by ammkrn on April 8, 2022
ammkrn on April 8, 2022

Adds a cli flag pijul --no-pager ... which disables the pager. The pager() function now respects the user’s global and repository configurations, as well as the cli flag.

ammkrn added a change on April 8, 2022
CGBNLOKSZE7J47TTH7GKUZ5KSJRD36DVIRSR3DTWKS5RG4HDJKOAC
pmeunier on April 14, 2022

Hi! Thanks for this change, but how about the following alternative:

In src/commands/mod.rs, change the pager() function to use the standard $PAGER environment variable instead of less. If you don’t want a pager, unset the variable.

ammkrn added a change on April 18, 2022
U6TQX5Z2NF6GX3SRLUBQGCZ7WAXNYMWWZ2YMADUSG4EWVKNV2BIAC
main
ammkrn on April 18, 2022

@pmeunier

U6TQX5Z2NF6GX3SRLUBQGCZ7WAXNYMWWZ2YMADUSG4EWVKNV2BIAC implements the $PAGER version.

I’m fine with either or a combination of both, like having a --no-pager option and also respecting the $PAGER variable for alternative pagers. In my opinion “unset $PAGER to disable paging” will seem very direct to experienced developers, but will be baffling to everyone else. You probably know this, but fwiw the explicit --no-pager option is what git did.