fix(zsh): preserve options for default completion#693
Conversation
|
Warning Review limit reached
More reviews will be available in 16 minutes and 45 seconds. Learn how PR review limits work. To continue reviewing without waiting, enable usage-based billing in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR fixes zsh default completion by ensuring the generated
Confidence Score: 5/5Safe to merge — a minimal, targeted fix to the generated zsh completion function with no side effects on the usage-shebang path. The change is a single-line addition to a shell code template. No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(zsh): preserve options for default c..." | Re-trigger Greptile |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | patch | `3.5.2` → `3.5.4` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>jdx/usage (usage)</summary> ### [`v3.5.4`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#354---2026-07-06) [Compare Source](jdx/usage@v3.5.3...v3.5.4) ##### 🐛 Bug Fixes - **(complete)** skip unreadable files in fish shebang completion scan by [@​GrantD-ADSK](https://github.com/GrantD-ADSK) in [#​707](jdx/usage#707) ##### 🔍 Other Changes - Enable Entire for Codex by [@​jdx](https://github.com/jdx) in [#​695](jdx/usage#695) - Update sponsor references for jdx.dev by [@​jdx](https://github.com/jdx) in [#​702](jdx/usage#702) - use release backends for cargo tools by [@​jdx](https://github.com/jdx) in [#​709](jdx/usage#709) ##### 📦️ Dependency Updates - update jdx/mise-action action to v4.2.0 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​698](jdx/usage#698) - update rust-lang/crates-io-auth-action action to v1.0.5 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​697](jdx/usage#697) - update rust crate itertools to 0.15 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​699](jdx/usage#699) - update actions/checkout action to v7 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​700](jdx/usage#700) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​701](jdx/usage#701) - update zizmorcore/zizmor-action action to v0.5.7 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​704](jdx/usage#704) - update dependency cargo-binstall to v1.20.1 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​703](jdx/usage#703) - update rust crate tera to v2 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​705](jdx/usage#705) - lock file maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​708](jdx/usage#708) ##### New Contributors - [@​GrantD-ADSK](https://github.com/GrantD-ADSK) made their first contribution in [#​707](jdx/usage#707) ### [`v3.5.3`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#353---2026-06-23) [Compare Source](jdx/usage@v3.5.2...v3.5.3) ##### 🐛 Bug Fixes - **(docs)** show negated flags in cli help by [@​jdx](https://github.com/jdx) in [#​694](jdx/usage#694) - **(zsh)** preserve options for default completion by [@​jdx](https://github.com/jdx) in [#​693](jdx/usage#693) ##### 📦️ Dependency Updates - update jdx/pr-closer action to v1.1.0 by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​689](jdx/usage#689) - lock file maintenance lockfile maintenance by [@​renovate\[bot\]](https://github.com/renovate\[bot]) in [#​691](jdx/usage#691) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yNTYuMCIsInVwZGF0ZWRJblZlciI6IjQzLjI1Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6cGF0Y2giXX0=-->
Summary
emulate -L zshnomatchand enableextendedglobbefore delegating to_filesFixes #692.
Validation
cargo test -p usage-lib test_complete_zsh_initcargo test -p usage-cli test_zsh_completion_init_integration --test shell_completions_integrationNote
Low Risk
Narrow change to generated zsh init completion and its tests; no auth, data, or core runtime behavior.
Overview
The generated zsh completion-init handler (
_usage_default_complete) now runssetopt localoptions nonomatch extendedglobimmediately afteremulate -L zsh, so when a command is not a usage shebang and the handler falls back to_files, file completion still seesnomatchoff andextendedglobon instead of whateveremulateleft behind.The zsh init integration test stubs
_filesto report those options, adds aplain(non-usage) completion case to hit the fallback path, and assertsnomatch=off extendedglob=on. Thecomplete_zsh_initsnapshot is updated for the new line in generated output.Reviewed by Cursor Bugbot for commit 3d9c234. Bugbot is set up for automated code reviews on this repo. Configure here.