Automatic pagination does not work
mloskot opened this issue · 2 comments
Problem Statement
The README says "Automatic pagination" but there seem to be no pagination applied by default, neither xq --help
lists a dedicated option.
I'm using the current latest installed with go
. Interestingly, it reports Zero version
$ xq --version
xq version 0.0.0 (unknown, 000000)
Steps to Reproduce
curl https://example.com/long-file.xml | xq
Actual Result
xq
outputs hundreds of lines of the long-file.xml
Expected Result
less
-like pagination?
p.s. Thank you for xq
. It's an awesome idea with jq
/yq
-like potential. The fact it's written in Go makes it even more awesome!
I'm using the current latest installed with go. Interestingly, it reports Zero version
Yes, it's expected. The final binary is prepared/compiled on your machine, so some attributes of the build process are absent.
less-like pagination?
It exists already (see https://github.com/sibprogrammer/xq/blob/master/internal/utils/utils.go#L340), but availability depends on the pager's presence.
Could you check the output of the following command: echo $PAGER
?
If the variable is empty, try to set it export PAGER=less
and check the results.
p.s. Thank you for xq
Thank you for your support, @mloskot :)
Ha! The PAGER
was empty in my Git Bash. Sorry for false report then.