djellemah opened a new pull request, #15597: URL: https://github.com/apache/datafusion/pull/15597
## Which issue does this PR close? - Closes #15596 ## Rationale for this change Explained in issue. Common in other cli programs implemeting querying of data. ## What changes are included in this PR? Add a pager (`less` by default). Check that it exists. Use it for query output. Allow some manipulation of which pager program is used, and what its command line arguments are, via `\pset` (following `psql` usage of `\pset`) Allow use of pager to be switched off. Do not use a pager if stdout is redirected to a non-tty. ## Are these changes tested? Not in unit tests. ## Are there any user-facing changes? Yes. The purpose of these changes is to improve UX. Not certain if the change from specifying format using `\pset csv` to using `pset format csv` is considered a breaking change. In any case, `\pset` appears to come from `psql`, which uses subcommands to specify several areas of output configuration, one of which is `pager`. `datafusion-cli` should therefore have used `\pset format whatever` from the outset. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org