Skip to content

Escape $ and backticks in zsh completion descriptions - #157

Open
afurm wants to merge 1 commit into
ruby:masterfrom
afurm:fix-compsys-escape-shell-expansion
Open

afurm wants to merge 1 commit into
ruby:masterfrom
afurm:fix-compsys-escape-shell-expansion

Conversation

@afurm

@afurm afurm commented Oct 14, 2026

Copy link
Copy Markdown
Member

The compsys zsh completion generator double-quotes option descriptions in _arguments specs, but only escaped \, ", [, and ]. Descriptions that include $ or backticks were expanded or executed when zsh loaded the completion file.

This adds $ and backticks to the escape set, and covers it with test_compsys_escapes_shell_expansion.

The generated _arguments specs are double-quoted, so a description such as
"costs $5" or one mentioning `cmd` was expanded, or run, by zsh when the
completion file was loaded.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant