Saltar al contenido principal
Version: Próxima versión

Autocompletado en la linea de comandos

info

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.

A diferencia de otros gestores de paquetes populares, que normalmente requieren plugins, pnpm soporta el autocompletado de la línea de comandos para Bash, Zsh, Fish y similares.

To setup autocompletion for Bash, run:

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

Para ver ejemplos de auto-completado, lea este artículo.

Fig (solo en macOS)

Puede configurar auto-completados de estilo IDE para pnpm con Fig. Funciona en Bash, Zsh y Fish.

Para instalar, ejecute:

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.