>_ZSH-BETTER-NPM-COMPLETION
Better completion for npm. npm install <TAB> recommends from npm cache. npm uninstall <TAB> recommends from dependencies / devDependencies. npm run <TAB> shows the script body. Falls back to the default npm completion when none of the above applies.
Install
# Zinit
zinit ice lucid nocompile
zinit load MenkeTechnologies/zsh-better-npm-completion
# Oh My Zsh
git clone https://github.com/MenkeTechnologies/zsh-better-npm-completion \
"$HOME/.oh-my-zsh/custom/plugins/zsh-better-npm-completion"
# then: plugins+=(zsh-better-npm-completion)
# Antigen
antigen bundle MenkeTechnologies/zsh-better-npm-completion
# Manual
git clone https://github.com/MenkeTechnologies/zsh-better-npm-completion ~/.zsh-better-npm-completion
source ~/.zsh-better-npm-completion/zsh-better-npm-completion.plugin.zsh
Usage
| install from cache | npm install <TAB> |
| uninstall from package.json | npm uninstall <TAB> |
| run a script (shows body) | npm run <TAB> |
| everything else | falls through to default npm completion |
No configuration. Source the plugin, restart zsh, hit TAB.
Sibling plugins
Part of the MenkeTechnologies zsh plugin family — the MenkeTechnologiesMeta umbrella:
- zsh-cargo-completion — live
cargo add/cargo installcompletion - zsh-cpan-completion — live MetaCPAN
cpan/cpanmcompletion - zsh-dotnet-completion — dotnet CLI completion
- zsh-expand — spacebar expansion (11,683 tests)
- zsh-gem-completion — ruby
gem installremote completion - zsh-git-acp — 159 git aliases + add/commit/push keybindings
- zsh-git-repo-cache — index every git repo on disk
- zsh-learn — MySQL-backed learning collection / quiz
- zsh-more-completions — 33,175-file mega completion corpus
- zsh-nginx — nginx commands + service-wrapper aliases
- zsh-pip-description-completion — pip remote completion with descriptions
- zsh-sed-sub — in-place sed substitution on the command line
- zsh-sudo — ESC ESC to prepend sudo
- zsh-xcode-completions — xcodebuild / xcrun / swift completion