domsleee / posh-tabcomplete

Blazing fast tab completion for powershell.
4 stars 1 forks source link

fix: Completions with special characters (e.g. '"&$`) are quoted #27

Closed domsleee closed 1 month ago

domsleee commented 1 month ago

Mentioned https://github.com/domsleee/posh-tabcomplete/issues/24#issuecomment-2321561807

New behaviour is to add single quotes around completions with special characters.

An example package.json file:

{
    "scripts": {
        "with space": "echo hello world",
        "withsingle'quote": "echo hello world",
        "withdouble\"quote": "echo hello world",
        "with`backtick": "echo hello world",
        "with&ampersand": "echo hello world",
        "with$dollar": "echo hello world"
    }
}
Old New
with space 'with space'
withsingle'quote 'withsingle''quote'
withsingle"quote 'withdouble"quote'
with`backtick" | 'with`backtick'
with&ampersand 'with&ampersand'
with$dollar 'with$dollar'