[Feature Request] Shell completion for `pnpm exec command`
Contribution
- I'd be willing to implement this feature (contributing guide)
Describe the user story
Shell completion is supported for locally-installed executables when invoked directly:
pnpm command TABHowever, the equivalent explicit form does not provide completions:
pnpm exec command TABFor example, given a locally installed CLI named foo with a zsh completion definition:
pnpm foo TAB # completions work
pnpm exec foo TAB # no completionsDescribe the solution you'd like
Since pnpm command and pnpm exec command both execute project-local binaries, pnpm exec command should ideally delegate shell completion to the executable in the same way.
Please support completions for pnpm exec command.
Describe the drawbacks of your solution
None
Describe alternatives you've considered
Using the shorthand form is a workaround:
pnpm command TABHowever, pnpm exec command is the explicit form intended for executing a project-local binary. It also avoids ambiguity with pnpm's own commands, so using the shorthand is not a suitable replacement in all cases.
Also, I always use the exec form out of habit, as I'm sure many others do.
Source: pnpm/pnpm