-
-
Notifications
You must be signed in to change notification settings - Fork 38
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: jdx/usage
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: jdx/usage
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.2.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 3 commits
- 26 files changed
- 4 contributors
Commits on Mar 23, 2026
-
fix(zsh): escape parentheses and brackets in completion descriptions (#…
…559) ## Summary - Escape `(`, `)`, `[`, `]` in zsh completion output to prevent `_describe` from interpreting them as glob qualifiers/character classes - Extract a `zsh_escape()` helper that handles all zsh-special characters (colons, parens, brackets) - Add test fixture and integration test verifying the escaping Fixes #558 ## Test plan - [x] New test `complete_word_zsh_escapes_parens_and_brackets` verifies escaped output - [x] Verified test fails without the fix (parentheses/brackets passed through unescaped) - [x] Full test suite passes - [x] Clippy clean 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: only adjusts zsh completion output formatting by adding additional escaping, with coverage via a new integration test. > > **Overview** > Fixes zsh completion output for `_describe` by escaping additional special characters in `name:description` entries. The previous inline colon escaping is replaced with a shared `zsh_escape()` helper that also escapes `(`, `)`, `[` and `]` to prevent glob/character-class interpretation. > > Adds an integration test plus a new example spec to verify zsh output is correctly escaped for descriptions containing parentheses/brackets (and colons). > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit f165847. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f26b3d - Browse repository at this point
Copy the full SHA 1f26b3dView commit details -
feat: Support env-backed choices with
choices env=...(#548)## Summary - add `env` support to `choices` so specs can source allowed values from an environment variable - honor `Parser::with_env(...)` without falling back to the process environment when a custom env map is provided - reject explicit values when `choices env=...` resolves to no values instead of silently disabling validation - preserve `choices env=...` when `SpecArgBuilder::choices()` is called after `choices_env(...)` - resolve env-backed choices for interactive shell completion at completion time - preserve `choices env=...` in help/docs instead of snapshotting live env-backed values into generated output - keep Fig suggestions literal-only so `usage generate fig` does not bake generation-time environment values into a static file ## Example ```kdl arg "<env>" { choices env="DEPLOY_ENVS" } ``` With `DEPLOY_ENVS="foo,bar baz"`, valid values become `foo`, `bar`, and `baz`. ## Implementation notes - `choices` now accepts an optional `env` property and preserves it when serializing back to KDL - env-backed values are split on commas and/or whitespace, with empty entries ignored - env-backed values are appended after literal choices and deduplicated against existing entries - parsing uses the caller-provided env map when `Parser::with_env(...)` is used; it only consults the process environment when no custom env map is provided - env-backed choices that resolve to no values now fail validation for explicit CLI input with a targeted error message instead of accepting any value - `SpecArgBuilder::choices()` now preserves any previously configured `choices_env(...)` - help/docs render literal choices as before and also surface the controlling env var for env-backed choices ## Tests - unit tests for env choice splitting and deduplication - parser tests covering arg/flag validation with `Parser::with_env(...)` - parser test covering the empty env-backed choice set case - builder test covering `.choices_env(...).choices(...)` ordering - completion test covering env-backed choices - dump test covering KDL round-trippingConfiguration menu - View commit details
-
Copy full SHA for f1af365 - Browse repository at this point
Copy the full SHA f1af365View commit details -
### 🚀 Features - Support env-backed choices with `choices env=...` by [@mustafa0x](https://github.com/mustafa0x) in [#548](#548) ### 🐛 Bug Fixes - **(zsh)** escape parentheses and brackets in completion descriptions by [@jdx](https://github.com/jdx) in [#559](#559) ### New Contributors - @mustafa0x made their first contribution in [#548](#548)
Configuration menu - View commit details
-
Copy full SHA for 1b428b7 - Browse repository at this point
Copy the full SHA 1b428b7View commit details
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff v3.1.0...v3.2.0