Summary
Long output from display, audit, and convert commands dumps to the terminal in a single instant, making it impossible to read without manually piping through less or scrolling back. The tool should support built-in paging for interactive terminal use.
Proposed Solution
Add a --pager flag (and corresponding display.pager config option) that pipes output through the user's preferred pager ($PAGER, defaulting to less -R).
Scope:
display command (primary — always terminal output)
audit command (when outputting to terminal, not file)
convert command (when outputting to terminal, not file)
Behavior:
--pager enables paging (default: off, matching current behavior)
display.pager: true in config enables it persistently
- Pager is skipped when output is redirected to a file (
-o flag or > file)
- Pager is skipped when stdout is not a TTY (piped to another command)
- Respects
$PAGER environment variable, falls back to less -R
- ANSI colors must be preserved through the pager (
-R flag for less)
Context
The display.pager config key already exists in the config struct (internal/config/config.go:17) and is wired through viper, but nothing reads it in the command handlers. The --pager CLI flag does not exist yet.
This also came up while prototyping VHS terminal demo GIFs — the output renders too fast to capture meaningful paging animations without built-in pager support.
Notes
- The existing
display.pager config field (config.IsDisplayPager()) is already plumbed but unused — this work would activate it
- Consider whether
--pager should be a persistent flag on root (available to all commands) or scoped per-command
glamour output contains ANSI escape codes — the pager must handle raw ANSI (e.g., less -R)
Summary
Long output from
display,audit, andconvertcommands dumps to the terminal in a single instant, making it impossible to read without manually piping throughlessor scrolling back. The tool should support built-in paging for interactive terminal use.Proposed Solution
Add a
--pagerflag (and correspondingdisplay.pagerconfig option) that pipes output through the user's preferred pager ($PAGER, defaulting toless -R).Scope:
displaycommand (primary — always terminal output)auditcommand (when outputting to terminal, not file)convertcommand (when outputting to terminal, not file)Behavior:
--pagerenables paging (default: off, matching current behavior)display.pager: truein config enables it persistently-oflag or> file)$PAGERenvironment variable, falls back toless -R-Rflag for less)Context
The
display.pagerconfig key already exists in the config struct (internal/config/config.go:17) and is wired through viper, but nothing reads it in the command handlers. The--pagerCLI flag does not exist yet.This also came up while prototyping VHS terminal demo GIFs — the output renders too fast to capture meaningful paging animations without built-in pager support.
Notes
display.pagerconfig field (config.IsDisplayPager()) is already plumbed but unused — this work would activate it--pagershould be a persistent flag on root (available to all commands) or scoped per-commandglamouroutput contains ANSI escape codes — the pager must handle raw ANSI (e.g.,less -R)