Skip to content

feat(cli): add "Did you mean?" suggestions on command typos#1029

Merged
mergify[bot] merged 1 commit intomainfrom
devs/JulianMaurin/feat/did-you-mean/I3244db079ff29e5cd460165ef95d5738234796a1
Mar 16, 2026
Merged

feat(cli): add "Did you mean?" suggestions on command typos#1029
mergify[bot] merged 1 commit intomainfrom
devs/JulianMaurin/feat/did-you-mean/I3244db079ff29e5cd460165ef95d5738234796a1

Conversation

@JulianMaurin
Copy link
Copy Markdown
Contributor

@JulianMaurin JulianMaurin commented Mar 15, 2026

Use a custom click.Group subclass that leverages difflib to suggest
close command names when the user mistypes a subcommand.

Example:

$ mergify stac
Error: No such command 'stac'.

Did you mean one of these?
    'stack'

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

@mergify mergify bot had a problem deploying to Mergify Merge Protections March 15, 2026 12:05 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 15, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success=ci-gate

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by>=2
    • author = dependabot[bot]
    • author = mergify-ci-bot
    • author = renovate[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

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)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 15, 2026

🧪 CI Insights

Here's what we observed from your CI run for cb48cf7.

🟢 All jobs passed!

But CI Insights is watching 👀

@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/did-you-mean/I3244db079ff29e5cd460165ef95d5738234796a1 branch from fab197b to 7d5ff52 Compare March 15, 2026 12:09
@mergify mergify bot had a problem deploying to Mergify Merge Protections March 15, 2026 12:09 Failure
@mergify mergify bot requested a review from a team March 15, 2026 12:11
@JulianMaurin JulianMaurin marked this pull request as ready for review March 15, 2026 12:27
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/did-you-mean/I3244db079ff29e5cd460165ef95d5738234796a1 branch from 7d5ff52 to e2c44c5 Compare March 15, 2026 16:46
@mergify mergify bot had a problem deploying to Mergify Merge Protections March 15, 2026 16:47 Failure
jd
jd previously requested changes Mar 16, 2026
Copy link
Copy Markdown
Member

@jd jd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worth some tests

Use a custom click.Group subclass that leverages difflib to suggest
close command names when the user mistypes a subcommand.

Example:

    $ mergify stac
    Error: No such command 'stac'.

    Did you mean one of these?
        'stack'

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I3244db079ff29e5cd460165ef95d5738234796a1
@JulianMaurin JulianMaurin force-pushed the devs/JulianMaurin/feat/did-you-mean/I3244db079ff29e5cd460165ef95d5738234796a1 branch from e2c44c5 to cb48cf7 Compare March 16, 2026 07:14
@mergify mergify bot dismissed jd’s stale review March 16, 2026 07:14

Pull request has been modified.

@mergify mergify bot deployed to Mergify Merge Protections March 16, 2026 07:14 Active
@mergify mergify bot requested a review from a team March 16, 2026 07:16
@mergify mergify bot requested a review from a team March 16, 2026 07:21
@mergify mergify bot merged commit c6ca9e9 into main Mar 16, 2026
11 checks passed
@mergify mergify bot deleted the devs/JulianMaurin/feat/did-you-mean/I3244db079ff29e5cd460165ef95d5738234796a1 branch March 16, 2026 10:47
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 16, 2026

Merge Queue Status

  • Entered queue2026-03-16 10:47 UTC · Rule: default
  • Checks passed · in-place
  • Merged2026-03-16 10:47 UTC · at cb48cf7ffcf90253815337a3c41b7025d3dd05e1

This pull request spent 5 seconds in the queue, with no time running CI.

Required conditions to merge

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