Langsung ke konten utama
Versi: Selanjutnya

Isi Otomatis untuk Tab Baris Perintah

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

To setup autocompletion for Fish, run:

pnpm completion fish > ~/.config/fish/completions/pnpm.fish

g-plane/pnpm-shell-completion

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

Features:

  • Memberikan pengisian otomatis untuk pnpm --filter <package>.
  • Memberikan pengisian otomatis untuk perintah pnpm remove , bahkan dalam package workspace (dengan menyebutkan opsi --filter).
  • Memberikan pengisian otomatis untuk skrip dalam package.json.