본문으로 건너뛰기
버전: Next

Command line tab 자동완성

info

Completion for pnpm v9 is incompatible with completion for older pnpm versions. If you have already installed pnpm completion for a version older than v9, you must uninstall it first to ensure that completion for v9 works properly. You can do this by removing the section of code that contains __tabtab in your dot files.

Unlike other popular package managers, which usually require plugins, pnpm supports command line tab-completion for Bash, Zsh, Fish, and similar shells.

To setup autocompletion for Bash, run:

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

완성된 예제를 보려면, 이 문서를 참고하세요.

Fig (on macOS only)

Fig을 사용하여 pnpm에 대한 IDE 스타일 자동 완성을 얻을 수 있습니다. Bash, Zsh 및 Fish에서 작동합니다.

설치하려면 다음을 실행하십시오.

brew install fig

g-plane/pnpm-shell-completion

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

Features:

  • 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.