Group CLI options into --help sections - #49
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Groups
--helpoutput 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), andLance options(the version selectors and row-id flags), applied uniformly across every command via claphelp_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