-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(wrangler): add shell completions (bash, zsh, fish) #11637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(wrangler): add shell completions (bash, zsh, fish) #11637
Conversation
🦋 Changeset detectedLatest commit: 9bb2d3e The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
2b1ea6e to
b1462b4
Compare
3f2cbc1 to
2bfe024
Compare
2bfe024 to
49397a1
Compare
|
Crazy work @dmmulroy |
|
@claude review this. Focus on bugs and gaps in testing, if any. |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
The reason the PR description workflow is failing is because it relies on the specific format of the PR template checklist, so you'll need to add that for it to pass. |
Yeah, if you copy this template @dmmulroy it should fix that PR description CI. |
24de860 to
5d6390e
Compare
5d6390e to
f352e34
Compare
Thanks for the review - I missed the |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
516a020 to
5b6f040
Compare
|
There is an existing PR open that does the same thing, but using |
I've tested both this and the other PR and this PR seems to be slightly better in terms of (slightly) better DX, full control of the completions logic (Should we ever want to make tweaks it'll be easier) and also more comprehensive tests to cover this new feature. |
|
chatted internally we're going to reopen #11113 and take that approach |
Fixes #53
Summary
Adds
wrangler completionscommand generating shell completion scripts for bash, zsh, fish.Approach
Uses dynamic completions via a hidden
wrangler __completecommand which is the same pattern used by kubectl, docker, and cobra-based CLIs. Shell scripts callwrangler __completeat runtime, which outputs tab-separated completions.Completions derive from the same registry as
--help, so new commands/flags are automatically included.Installation
wrangler completions --help