Перейти к основному содержимому
Версия: 8.x

pnpm completion

Print shell completion code to stdout.

pnpm completion <shell>

Parameters

<shell>

Shell to print completion code for. Only 4 shells are supported: bash, fish, pwsh, zsh.

Примеры

Activate completion for Bash by sourcing it from ~/.bashrc

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

Install completion for Bash directly to its completion directory (for installing pnpm as a Linux distro package)

mkdir -p /usr/share/bash-completion/completions/
pnpm completion bash > /usr/share/bash-completion/completions/pnpm