メインコンテンツまでスキップ
Version: 9.x

コマンドライン Tab 補完

情報

Completion for pnpm v9 is incompatible with completion for older pnpm versions. If you already install pnpm completion for version older than v9, you must uninstall it first so that completion for v9 may work properly. You may do so by removing section of code that contains __tabtab in your dot files.

通常プラグインを必要とする他のパッケージマネージャーとは異なり、pnpm は Bash, Zsh, Fish, またこれらと同様のシェルのコマンドライン Tab 補完をサポートします。

To setup autocompletion for Bash, run:

pnpm completion bash > ~/completion-for-pnpm.bash
echo 'source ~/completion-for-pnpm.bash' >> ~/.bashrc

To see examples of completion, read this article.

Fig (macOS のみ)

You can get IDE-style autocompletions for pnpm with Fig. Bash、Zsh、Fish で動作します。

インストールするには、次を実行します。

brew install fig

g-plane/pnpm-shell-completion

pnpm-shell-completion is a shell plugin maintained by Pig Fang on Github.

機能:

  • Provide completion for pnpm --filter <package>.
  • Provide completion for pnpm remove command, even in workspace's packages (by specifying --filter option).
  • Provide completion for scripts in package.json.