Skip to content

ZSH completion fails when descriptions contain quotes or <'s  #65

Open
@ephur

Description

@ephur

We have an internal tool I'm trying to generate completions for, and some of the option strings include things like:

--opt "device where name=<customerid>-foo" 

In this case, ZSH is unable to load the generated completions due to the < being unescaped. Outputting to a file and giving a quick replace of all instances of < with \< allowed this to work.

The second problem case is where options contain single quotes in the usage description for example, an option:

--opt "a "string" to use" 

causes the following ZSH error:
#> tool param:name:delete --
_tool.phar:181: bad set of key/value pairs for associative array
_tool.phar:181: bad set of key/value pairs for associative array
_tool.phar:181: bad set of key/value pairs for associative array

I believe the "'s also need escaped when the completions are rendered.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions