Skip to content

fix: Give global CLI flags a short first help line - #1084

Merged
twitchyliquid64 merged 1 commit into
mainfrom
inbox-patch/global-flag-short-help-8d5db7918e40ca3c
Jul 29, 2026
Merged

fix: Give global CLI flags a short first help line#1084
twitchyliquid64 merged 1 commit into
mainfrom
inbox-patch/global-flag-short-help-8d5db7918e40ca3c

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #1068
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABKmg5yQ

The --config-dir, --provider, and --no-input doc comments in GlobalArgs had no blank /// separator, so clap treated the whole multi-sentence block as short help and rendered it verbatim in -h on every subcommand's help screen. Each flag now leads with a concise first line, with the existing prose moved below a blank ///, so -h stays short while --help keeps the full detail. The scoped Distillery pass surfaced no directly relevant short-help precedent.

Verification

cargo fmt --all --check — pass (no drift)
cargo clippy --workspace --locked -- -D warnings — pass (0 warnings)
cargo build --workspace --locked — pass
cargo test --workspace --locked — pass (all suites, 0 failed)

Generated by inbox-patch ·

Note

Make --command flag visible in CLI help for min session attach

Removes hide = true from the --command flag in AttachArgs so it appears in CLI help output. Also improves doc comments on global flags (--config-dir, --provider, --no-input) to clarify defaults and behavior, and updates the non-TTY error message to reference --command without describing it as hidden.

Macroscope summarized 941b329.

Summary by CodeRabbit

  • Documentation
    • Clarified command-line help text for configuration, provider selection, and non-interactive mode.
    • Made the --command option visible in session attach help.
  • Bug Fixes
    • Improved the error message shown when interactive session attachment is attempted without a terminal, including guidance for using --command.

The doc comments for --config-dir, --provider, and --no-input had no
blank line separating a summary from the prose, so clap used the whole
multi-sentence block as short help. That block then rendered verbatim
in -h on all 20 subcommand help screens, dominating each one.

Add a concise first line to each flag and move the existing prose
below a blank /// separator, so -h shows one line and --help keeps the
full detail.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9911269-d8d7-4f3a-8a54-4f3f525bd7f0

📥 Commits

Reviewing files that changed from the base of the PR and between 0e25232 and 941b329.

📒 Files selected for processing (1)
  • crates/minimal/src/lib.rs

📝 Walkthrough

Walkthrough

The CLI help text for three global options was reworded, min session attach --command was made visible in help, and the non-TTY attach error now directly references command-based non-interactive usage.

Changes

CLI help and attach guidance

Layer / File(s) Summary
Global option help text
crates/minimal/src/lib.rs
The --config-dir, --provider, and --no-input descriptions were reworded and reflowed, including clarification of non-terminal behavior.
Attach command discoverability and error guidance
crates/minimal/src/lib.rs
The --command option is no longer hidden, and the non-TTY interactive attach error points to min session attach --command <cmd>.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related issues

  • Issue 1062 — modifies the visibility of AttachArgs::command in the same source area.
  • Issue 416 — concerns attach command visibility and non-TTY guidance.
  • Issue 399 — updates the same global option help text.

Possibly related PRs

Suggested reviewers: twitchyliquid64, msample, evanspearman

Poem

A bunny found a hidden command,
And pulled it into view;
Three flags gained clearer words,
While attach guidance grew.
“Use --command,” the rabbit sings,
Then hops through help anew.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@twitchyliquid64
twitchyliquid64 merged commit 64a0764 into main Jul 29, 2026
28 of 29 checks passed
@twitchyliquid64
twitchyliquid64 deleted the inbox-patch/global-flag-short-help-8d5db7918e40ca3c branch July 29, 2026 21:51
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.

Three global flags' long prose is inlined into all 20 help screens, -h included

1 participant