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 |
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.