pnpm-shell-completion
pnpm-shell-completion copied to clipboard
Complete your pnpm command fastly.
pnpm-shell-completion
https://user-images.githubusercontent.com/17216317/218267283-ac16f583-506e-473f-9efc-e25095e38504.mp4
or
fish
https://user-images.githubusercontent.com/17974631/230724177-c23eb38c-6112-49f8-8091-54c68a074739.webm
You may also like:
- icd - Powerful
cdcommand with fuzzy-search tool.
Features
- Provide completion for
pnpm --filter <package>. - Provide completion for
pnpm removecommand, even in workspace's packages (by specifying--filteroption). - Provide completion for npm scripts in
package.json.
Limitiation
- 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.
- NPM scripts completion requires the presence of a
nameproperty in thepackage.jsonfile.
Supported shells
- Zsh
- PowerShell Core
- Fish Shell
Installation
zinit
Update your .zshrc file with the following line:
zinit ice atload"zpcdreplay" atclone"./zplug.zsh" atpull"%atclone"
zinit light g-plane/pnpm-shell-completion
zplug
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
Manual
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.
With Bun
Disclaimer: the pnpm-oh-my-zsh-completion-install package isn't maintained officially, and we can't guarantee the security so use at your own risk.
If you have Bun, you can run bunx pnpm-oh-my-zsh-completion-install which will download latest release, unpack, copy and add the plugin to your .zshrc.
Zim
Add the following line to your .zimrc file:
zmodule [email protected]:g-plane/pnpm-shell-completion.git --on-pull './zplug.zsh'
Make sure this line comes after zmodule completion. If it doesn't exist, add it manually.
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
Fisher
fisher install g-plane/pnpm-shell-completion
Manual Install
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