/pnpm-shell-completion

Complete your pnpm command fastly.

Primary LanguageShellMIT LicenseMIT

pnpm-shell-completion

2023-02-11.23-21-48.mp4

or

asciicast

fish

2023.04.08.21.36.23.webm

You may also like:

  • icd - Powerful cd command with fuzzy-search tool.

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 npm scripts in package.json.

Note that we won't provide completion for all commands and options, and we only focus those frequently used. Too many completion items may have impact on efficiency.

Supported shells

  • Zsh
  • PowerShell Core
  • fish

Installation

Update your .zshrc file with the following line:

zinit ice atload"zpcdreplay" atclone"./zplug.zsh" atpull"%atclone"
zinit light g-plane/pnpm-shell-completion

Update your .zshrc file with the following line:

zplug "g-plane/pnpm-shell-completion", hook-build:"./zplug.zsh", defer:2

Arch Linux

Install it with any AUR helper, for example:

paru -S pnpm-shell-completion

Then, update your .zshrc file with the following line:

source /usr/share/zsh/plugins/pnpm-shell-completion/pnpm-shell-completion.zsh

Oh My Zsh

Please go to the GitHub releases page and download the latest binary files.

For Apple Silicon (M-series chips) users, please choose aarch64-apple-darwin; for Intel Mac users, please choose x86_64-apple-darwin; for Linux users, please choose x86_64-unknown-linux-gnu or x86_64-unknown-linux-musl.

After downloaded, decompress the .zip or .tar.gz file.

Then, run:

./install.zsh $ZSH_CUSTOM/plugins

Next, please edit your .zshrc file. Add pnpm-shell-completion to plugins section like this:

plugins=(
  # ... your other plugins
+ pnpm-shell-completion
)

Restart your terminal.

PowerShell Core

Please go to the GitHub releases page and download pnpm-shell-completion_x86_64-pc-windows-gnu.zip, then decompress it.

Edit your PowerShell profile file (if you don't know where it is, run echo $PROFILE to check it), and add the following line:

. path\to\the\directory\you\decompressed\pnpm-shell-completion.ps1

fish

Please go to the GitHub releases page and download the latest binary files.

For Apple Silicon (M-series chips) users, please choose aarch64-apple-darwin; for Intel Mac users, please choose x86_64-apple-darwin; for Linux users, please choose x86_64-unknown-linux-gnu or x86_64-unknown-linux-musl.

After downloaded, decompress the .zip or .tar.gz file.

Then, run:

fish ./install.fish ${any path that has been added in your $PATH variable}

By default, pnpm.fish will be copied to your ~/.config/fish/completions/ according to the official documentation.

License

MIT License

Copyright (c) 2023-present Pig Fang