Skip to content

feat(cli): generate shell completions and a man page#1658

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b
Jun 23, 2026
Merged

feat(cli): generate shell completions and a man page#1658
mergify[bot] merged 1 commit into
mainfrom
devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b

Conversation

@JulianMaurin

@JulianMaurin JulianMaurin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

A CLI shipped via wheels + curl|sh + self-update should offer
tab-completion and a man page; this one had the CommandFactory
plumbing but exposed neither.

Add a user-facing mergify completions <bash|zsh|fish|…> that prints
the completion script to stdout (clap_complete), and a hidden
mergify _internal man that renders the roff man page to stdout
(clap_mangen) for packaging to install. Both are pure introspection
over the clap command tree, handled before the tokio runtime starts —
so now that stack is a real subcommand group (not the old shim),
completions cover it correctly.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

@mergify

mergify Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@JulianMaurin

JulianMaurin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 feat(cli): generate shell completions and a man page #1658 👈
2 test: golden-snapshot the CLI surface and guard schema drift #1659
3 refactor: dedupe the GIT_SEQUENCE_EDITOR lookup and drop port cruft #1660
4 docs(agents): rewrite AGENTS.md for the Rust workspace #1661
5 fix(cli): render stack-squash validation errors via clap #1671
6 feat(install): drop completions and a man page during install #1674

@JulianMaurin JulianMaurin marked this pull request as ready for review June 19, 2026 07:13
@mergify mergify Bot requested a review from a team June 19, 2026 07:18
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b branch from 6d9065b to 403899f Compare June 19, 2026 07:52
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-v-vv-verbosity-ladder-backed-tracing--e79b8ade branch from 7891534 to 0ea6dfa Compare June 19, 2026 07:52
@JulianMaurin

JulianMaurin commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 6d9065b 2026-06-19 07:52 UTC
2 rebase 6d9065b → 403899f (rebase only) 2026-06-19 07:52 UTC
3 content 403899f → 2d93dbb (raw) 2026-06-19 16:51 UTC
4 rebase 2d93dbb → e2d2f30 (rebase only) 2026-06-22 09:10 UTC
5 rebase e2d2f30 → 1b380ea (rebase only) 2026-06-22 09:15 UTC
6 rebase 1b380ea → 4c2d1ce (rebase only) 2026-06-22 13:00 UTC
7 rebase 4c2d1ce → 9a7d375 (rebase only) 2026-06-23 07:41 UTC
8 rebase 9a7d375 → eb00a9a (rebase only) 2026-06-23 09:11 UTC

@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 19, 2026 07:52 Failure
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-v-vv-verbosity-ladder-backed-tracing--e79b8ade branch from 0ea6dfa to bfa432f Compare June 19, 2026 16:51
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b branch from 403899f to 2d93dbb Compare June 19, 2026 16:51
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 22, 2026 09:15 Failure
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-v-vv-verbosity-ladder-backed-tracing--e79b8ade branch from 62fd948 to eb8a5b7 Compare June 22, 2026 13:00
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b branch from 1b380ea to 4c2d1ce Compare June 22, 2026 13:00
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 22, 2026 13:00 Failure
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-v-vv-verbosity-ladder-backed-tracing--e79b8ade branch from eb8a5b7 to d2d8ce2 Compare June 23, 2026 07:41
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b branch from 4c2d1ce to 9a7d375 Compare June 23, 2026 07:41
@mergify mergify Bot had a problem deploying to Mergify Merge Protections June 23, 2026 07:41 Failure
@mergify mergify Bot force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/add-v-vv-verbosity-ladder-backed-tracing--e79b8ade branch from d2d8ce2 to cd0e873 Compare June 23, 2026 07:54
Base automatically changed from devs/JulianMaurin/feat/rust-cli-excellence/add-v-vv-verbosity-ladder-backed-tracing--e79b8ade to main June 23, 2026 08:51
A CLI shipped via wheels + curl|sh + self-update should offer
tab-completion and a man page; this one had the CommandFactory
plumbing but exposed neither.

Add a user-facing `mergify completions <bash|zsh|fish|…>` that prints
the completion script to stdout (clap_complete), and a hidden
`mergify _internal man` that renders the roff man page to stdout
(clap_mangen) for packaging to install. Both are pure introspection
over the clap command tree, handled before the tokio runtime starts —
so now that `stack` is a real subcommand group (not the old shim),
completions cover it correctly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Change-Id: I4c27238bee92725e28116717f7eb47d05bff120f
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b branch from 9a7d375 to eb00a9a Compare June 23, 2026 09:11
@mergify mergify Bot deployed to Mergify Merge Protections June 23, 2026 09:12 Active
@mergify

mergify Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify

mergify Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-06-23 09:30 UTC · Rule: default · triggered by merge protections
  • Checks skipped · PR is already up-to-date
  • Merged2026-06-23 09:30 UTC · at eb00a9a8e674a763c74430b8ecf85093fc44e1bf · squash

This pull request spent 40 seconds in the queue, including 3 seconds running CI.

Required conditions to merge

@mergify mergify Bot merged commit e3539d1 into main Jun 23, 2026
22 of 42 checks passed
@mergify mergify Bot deleted the devs/JulianMaurin/feat/rust-cli-excellence/generate-shell-completions-man-page--4c27238b branch June 23, 2026 09:30
@mergify mergify Bot added queued and removed queued labels Jun 23, 2026
mergify Bot pushed a commit that referenced this pull request Jun 23, 2026
The CLI's contract (every flag, subcommand, value-hint, help string,
exit code) was only spot-checked structurally, so a dropped flag or
renamed leaf could regress unnoticed.

Add an `insta` JSON golden of the full generated schema (version
redacted, since it's release-stamped) — intentional CLI changes are
accepted with `cargo insta review`, accidental drift shows as a red
diff. Also assert directly that the stack subcommands in the schema
equal the `NATIVE_COMMANDS` registry, closing the two-list drift that
the old shim allowed (a deleted leaf used to vanish silently).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Depends-On: #1658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants