CLI output: terminal tables !468

merged merged by cmc on 2026-09-24 15:08 UTC · krz/gitbay:cli-output-tables into main

Discussion

cmc

Ref #254. Stacked on !467.

  • --term=<cols>[,color] as a leading argument selects terminal output; Dispatch strips it before lookup. sshd also honours an env request named GITBAY_TERM for stock ssh. OpenSSH's multiplexed sessions do not forward a session's SetEnv (TestTermEnvOverMultiplexedSession), so the CLI sends the argument.
  • Term, cell-width, clip and timestamp helpers; table prints plain tab rows or a fitted terminal table (dim header, state colours, relative ages, flex column shrinks first).
  • Every list command on table. Plain rows are unchanged apart from timestamps (RFC3339 to the second). repo log rows become tab-separated instead of fixed-width.
  • The next page at a terminal is a command on stderr (more: gitbay ... --cursor <c>), arguments quoted.
  • The CLI sends --term= when stdout is a terminal; NO_COLOR, TERM=dumb and --no-color drop colour. Client-side column padding is gone.
  • mr revisions' one-revision note goes to stderr.
  • e2e: every read command runs plain (no SGR) and at 60 columns (no line over 60 cells); views wait for the next MR.

retargeted from cli-output-refresh to main: !467 merged

2026-09-24 15:08 UTC