g-plane / pnpm-shell-completion

Complete your pnpm command fastly.
MIT License
119 stars 10 forks source link

Colons in script keys do not display in output. #8

Closed thtliife closed 1 year ago

thtliife commented 1 year ago

When using this completion for pnpm run scripts, if the script key contains a colon, it is not output correctly in terminal.

Reproduction repo here

eg: For a minimal package json like below:

{
  "name": "colon-in-scripts-repro",
  "version": "0.0.1",
  "description": "",
  "scripts": {
    "test": "echo \"this is working in pnpm-shell-completion\"",
    "test:broken": "echo \"this should output test:broken in pnpm-shell-completion\""
  }
}

the resulting output of pnpm <tab><tab> or pnpm run <tab><tab> is as below: broken completion output with colons