Skip to content

Group CLI options into --help sections - #49

Merged
jonasdedden merged 2 commits into
mainfrom
feat/issue-47-help-grouping
Jul 22, 2026
Merged

jonasdedden merged 2 commits into
mainfrom
feat/issue-47-help-grouping

Conversation

@jonasdedden

Copy link
Copy Markdown
Owner

Groups --help output into labelled sections instead of one flat list: Selection options (--columns/--exclude-columns/--where), Output options (--format/--binary-format/--max-list-items/--max-cell-width/--float-precision/--no-progress), and Lance options (the version selectors and row-id flags), applied uniformly across every command via clap help_heading/next_help_heading; command-specific flags and positionals stay in the default block. Includes a help-section test suite.

Trivial rebase onto current main (Format-enum region only, as both reviewers assessed); one fixup keeps the CHANGELOG Changed section in merge order.

Closes #47

🤖 Generated with Claude Code

jonasdedden and others added 2 commits July 22, 2026 13:39
Split every command's `--help` into labelled sections instead of one flat,
unordered option list:

- Selection options: --columns / --exclude-columns / --where
- Output options: --format / --binary-format / --max-list-items /
  --max-cell-width / --float-precision / --no-progress
- Lance options: the LanceArgs selectors (--branch/--version/--tag/--as-of)
  and RowIdArgs (--with-row-id/--with-row-addr)

Command-specific flags and positionals stay in the default block. Sections are
driven by clap `next_help_heading` on the flattened LanceArgs/RowIdArgs/FilterArg
structs and per-arg `help_heading` on the propagated globals, so grouping is
uniform across all commands with no heading leakage. The globals are reordered so
Selection precedes Output and the Output block stays contiguous.

Lance-only commands keep the "Lance options" heading (consistency) rather than
leaving those flags ungrouped, so the same flag always appears under the same
heading everywhere.

Adds tests/help_sections.rs asserting the headings and representative flags for
`cat` and `search`, plus that command-specific flags do not leak into a section.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jonasdedden
jonasdedden enabled auto-merge (squash) July 22, 2026 11:40
@jonasdedden
jonasdedden merged commit f8e7d0d into main Jul 22, 2026
4 checks passed
@jonasdedden
jonasdedden deleted the feat/issue-47-help-grouping branch July 22, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Group CLI options in --help output (Lance / Output / Selection sections)

1 participant