#14655·pnpm

[Feature Request] Shell completion for `pnpm exec command`

Author: lonix1Created Sep 7, 2026Updated Sep 26, 2026
Labelstype: featurepriority: 3idea: from tracker 15277

Contribution

Describe the user story

Shell completion is supported for locally-installed executables when invoked directly:

bash
pnpm command TAB

However, the equivalent explicit form does not provide completions:

bash
pnpm exec command TAB

For example, given a locally installed CLI named foo with a zsh completion definition:

bash
pnpm foo TAB       # completions work
pnpm exec foo TAB  # no completions

Describe 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:

bash
pnpm command TAB

However, 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.