Skip to content

feat(cli): Show result tables through a pager - #1826

Open
PingLiuPing wants to merge 1 commit into
facebookincubator:mainfrom
PingLiuPing:lp_cli_pager
Open

feat(cli): Show result tables through a pager#1826
PingLiuPing wants to merge 1 commit into
facebookincubator:mainfrom
PingLiuPing:lp_cli_pager

Conversation

@PingLiuPing

Copy link
Copy Markdown
Contributor

With axiom_sql, a result table wider than the terminal wrapped each row across several lines, which made a wide SELECT unreadable.

With this patch, the result tables written to a terminal now go through --pager, less -SFX by default, so a long row stays on one logical line and scrolls sideways. Redirected output is untouched: a pipe or a file still gets plain text, and --pager= turns the pager off.

printResults writes to a stream the caller supplies rather than to std::cout. The console formats into a buffer and hands it to the pager, then prints that same buffer to stdout when the pager will not start or exits with a failure.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Sep 4, 2026
@PingLiuPing PingLiuPing mentioned this pull request Sep 4, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant