Repository navigation
Escape backticks in zsh completion descriptions - #76126
walker1211 wants to merge 1 commit into
Conversation
Prevent generated zsh completion scripts from treating command examples in descriptions as command substitutions.
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: #64490 is already the open canonical PR for the same zsh completion description-escaping bug, and this newer PR is a narrower partial duplicate that does not cover the existing dollar-expansion case. So I’m closing this here and keeping the remaining discussion on the canonical linked item. Review detailsBest possible solution: Keep #64490 as the canonical fix path and fold in any useful subcommand backtick coverage from this PR before landing one changelog-backed, validated zsh escaping patch. Do we have a high-confidence way to reproduce the issue? Yes. Current main can be inspected by generating or reading the zsh completion output: descriptions containing backticks or Is this the best way to solve the issue? No. Escaping backticks is necessary, but this PR is not the best standalone fix because it leaves dollar parameter expansion open and duplicates the existing broader PR. Security review: Security review cleared: The diff is limited to TypeScript completion generation and a colocated test, with no workflow, dependency, lockfile, install script, permission, artifact-download, or secret-handling changes. What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against ad0d87d88180. |
Reuse the canonical description encoder for the double-quoted zsh arguments specification while retaining its single-quote layer. Remove the duplicate escaping path and cover built-in, root, and nested commands through real zsh parsing. Fixes #135089 Related: #76126, #64490 Co-authored-by: walker <[email protected]>
Reuse the canonical description encoder for the double-quoted zsh arguments specification while retaining its single-quote layer. Remove the duplicate escaping path and cover built-in, root, and nested commands through real zsh parsing. Fixes openclaw#135089 Related: openclaw#76126, openclaw#64490 Co-authored-by: walker <[email protected]>
Summary
Test plan
pnpm --dir ~/Projects/github.com/openclaw exec node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.ts src/cli/completion-cli.test.tspnpm --dir ~/Projects/github.com/openclaw exec node scripts/run-vitest.mjs run --config test/vitest/vitest.cli.config.tsgit diff --check🤖 Generated with Claude Code