Skip to content

Suggestion for --no-pager or --pager option #190

@BuriXon-code

Description

@BuriXon-code

Problem Statement

The built-in default pager for large files is very inconvenient (in my opinion). There are alternatives like the pre-built more, less, batcat, etc., or none at all.

Expected Result

It would be very nice if there was an additional option like --no-pager or --pager=XYZ/--pager XYZ to be optionally selected (default more/custom built in).

This can now be solved by PAGER= xq file.xml, but it is less intuitive, less convenient.

Additionally, you can use a custom env variable -> XQ_PAGER or something like that.
To make xq work as I expect, I output a global export PAGER= in shell rc, but unfortunately more than just xq uses this variable.
Github implemented something like this in its gh command -> GH_PAGER. Then, deleting a specific program's pager doesn't affect other programs.

The default built-in xq pager, however, has another problem -> it doesn't respond to scroll -> it only responds to the arrow keys (ESC[[A/B/C/D). It would be nice if it responded to scroll (e. g. in Termux).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions