Skip to content

feat: add "did you mean?" suggestions for typos#654

Merged
jdx merged 1 commit intomainfrom
feat/did-you-mean-suggestions
Jan 31, 2026
Merged

feat: add "did you mean?" suggestions for typos#654
jdx merged 1 commit intomainfrom
feat/did-you-mean-suggestions

Conversation

@jdx
Copy link
Copy Markdown
Owner

@jdx jdx commented Jan 31, 2026

Summary

  • Add helpful "Did you mean?" suggestions when users mistype hook names or config keys
  • Uses xx::suggest for fuzzy string matching with Jaro-Winkler algorithm
  • Updates xx submodule to v2.5.0

Examples

$ hk run pre-comit
Error: Hook 'pre-comit' not found. Did you mean 'pre-commit'?

$ hk config get jbs
Error: Unknown configuration key: 'jbs'. Did you mean 'jobs'?

Test plan

  • cargo test passes
  • Manual testing of typo suggestions

🤖 Generated with Claude Code


Note

Medium Risk
Mostly user-facing error-message improvements, but it also upgrades reqwest/TLS (rustls now using aws-lc-rs) and zip, which can affect networking/cert verification and archive handling behavior across platforms.

Overview
Improves CLI UX by adding "did you mean?" suggestions when users mistype configuration keys (hk config get/explain) or hook names (hk run), using xx::suggest::did_you_mean and centralizing config-key error formatting.

Updates Cargo.lock with a dependency refresh including xx to 2.5.0, reqwest to 0.13.1 (switching to rustls-platform-verifier), rustls crypto backend changes (aws-lc-rs), and zip to 7.2.0 with updated compression/crypto dependencies.

Written by Cursor Bugbot for commit ae337ce. This will update automatically on new commits. Configure here.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@socket-security
Copy link
Copy Markdown

socket-security Bot commented Jan 31, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: cargo aws-lc-sys under SSLeay-standalone

License: SSLeay-standalone - the applicable license policy does not allow this license (4) (aws-lc-sys-0.37.0/aws-lc/LICENSE)

License: OpenSSL-standalone - the applicable license policy does not allow this license (4) (aws-lc-sys-0.37.0/aws-lc/LICENSE)

License: OpenSSL-standalone - the applicable license policy does not allow this license (4) (aws-lc-sys-0.37.0/LICENSE)

License: SSLeay-standalone - the applicable license policy does not allow this license (4) (aws-lc-sys-0.37.0/LICENSE)

From: ?cargo/aws-lc-sys@0.37.0

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/aws-lc-sys@0.37.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: cargo webpki-root-certs under CDLA-Permissive-2.0

License: CDLA-Permissive-2.0 - the applicable license policy does not allow this license (4) (webpki-root-certs-1.0.5/LICENSE)

License: CDLA-Permissive-2.0 - the applicable license policy does not allow this license (4) (webpki-root-certs-1.0.5/Cargo.toml)

From: ?cargo/webpki-root-certs@1.0.5

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/webpki-root-certs@1.0.5. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@jdx jdx force-pushed the feat/did-you-mean-suggestions branch from f6bf5bc to 8e7e8ec Compare January 31, 2026 18:49
Add helpful suggestions when users mistype:
- Hook names (e.g., "pre-comit" -> Did you mean 'pre-commit'?)
- Config keys (e.g., "jbs" -> Did you mean 'jobs'?)

Uses xx::suggest for fuzzy string matching.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@jdx jdx force-pushed the feat/did-you-mean-suggestions branch from 8e7e8ec to ae337ce Compare January 31, 2026 18:56
@jdx jdx merged commit e391a4c into main Jan 31, 2026
18 checks passed
@jdx jdx deleted the feat/did-you-mean-suggestions branch January 31, 2026 19:08
@jdx jdx mentioned this pull request Jan 31, 2026
jdx added a commit that referenced this pull request Feb 1, 2026
### 🚀 Features

- **(init)** add auto-detection and interactive mode by
[@jdx](https://github.com/jdx) in
[#656](#656)
- **(stash)** use haiku names for stash patch backups by
[@jdx](https://github.com/jdx) in
[#655](#655)
- add git worktree support by [@jdx](https://github.com/jdx) in
[#651](#651)
- add "did you mean?" suggestions for typos by
[@jdx](https://github.com/jdx) in
[#654](#654)

### 🚜 Refactor

- use xx utilities and drop unused dependencies by
[@jdx](https://github.com/jdx) in
[#653](#653)

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Low risk release bookkeeping: mainly version string/package URL
updates and regenerated CLI docs, with no substantive runtime logic
changes.
> 
> **Overview**
> Releases **v1.35.0** by updating crate versions
(`Cargo.toml`/`Cargo.lock`) and adding the `1.35.0` entry to
`CHANGELOG.md`.
> 
> Regenerates documentation and examples to reference `v1.35.0` package
URLs and CLI version metadata, and updates `hk init` docs/usage to
include the new `--interactive` flag.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
46c426e. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: mise-en-dev <123107610+mise-en-dev@users.noreply.github.com>
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.

1 participant