The completion server previously offered only candidates from clap's command and option definitions, leaving the run script position empty. Initialize clap metadata before scanning boolean options and register the run-script alias. Track positional arguments and directory options in the completion context. Reuse the npm project prefix lookup and manifest reader to return sorted script names. Share workspace-root lookup with command execution, preserve explicit directories, and respect equals-only options. Escape zsh candidate separators after prefix filtering. Read manifests only at the run script position, before configuration or hooks are initialized, and propagate malformed manifest errors. The missing-script regression affects v12 only. The TypeScript v11 implementation already reads scripts from the project manifest. A related Bash glob expansion bug affects both versions and is fixed in both generated scripts. Preserve candidate lines without splitting or pathname expansion, quote Bash candidates for insertion, escape PowerShell candidate syntax, and normalize its quoted prefixes. Reuse the short-option scanner so combined directory and workspace-root flags select the same project as command execution. Closes pnpm/pnpm#15034.
331 B
331 B
pacquet, @pnpm/cli.commands, pnpm
| pacquet | @pnpm/cli.commands | pnpm |
|---|---|---|
| patch | patch | patch |
Fixed shell completion of package scripts for pnpm run and pnpm run-script pnpm/pnpm#15034.
Bash completion now preserves literal script names containing glob characters and shell punctuation in pnpm v11 and v12.