Option to intelligently enable pager based on output size (pset is not working)
See original GitHub issueDescription
It gets annoying that the pager is either on (set to less
) or off (set to cat
). When the query has a large number of output lines, it’s helpful to have the pager on, but when doing a bunch of small queries in preparation for a larger query, it’s helpful to have the pager off so you can see the query results in scrollback.
Would it be possible to have a pager option similar to \x auto
that decides whether to use the pager based on the size of the output?
Your environment
- OS: Mac OS 10.12.6
- pgcli version: 1.8.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (7 by maintainers)
Top Results From Across the Web
How do I prevent 'git diff' from using a pager? - Stack Overflow
--no-pager to Git will tell it to not use a pager. Passing the option -F to less will tell it to not page...
Read more >Auto Layout Guide: Working with Constraints in Interface Builder
Interface Builder intelligently selects the set of constraints based on the items you are constraining and the direction of your drag ...
Read more >How to make "screen length" or "no page" permanent? | Wired ...
I have tried both the screen length and no page commands and neither one seems. ... You need to have enable access to...
Read more >axe DevTools | Developer Tools for Accessibility Testing
Integrate accessibility testing into your existing automated testing process with axe DevTools. Toolkits available for web, iOS and Android.
Read more >Configure Monitors - Datadog Docs
To start configuring the monitor, complete the following: Define the search query: Construct a query to count events, measure metrics, group by one...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m looking for
pgcli
to implement the same behavior for\pset pager
thatpsql
has. For example, inpsql
:As expected, with
\pset pager always
, the pager is always used, and with\pset pager off
, the pager is never used. In cases where the pager is used, whether the screen is cleared or not afterwards depends on the pager. In cases where it is not, the pager is never invoked.However,
\pset pager
seems to be completely ignored bypgcli
:So perhaps this issue would be more accurately titled “pgcli ignores \pset pager value”?
@maxrothman
export LESS=-XFR
may help here. See this for more information.