zsh yarn completions
Yarn completions for Z-shell that supports
yarn workspaces
What is does?
- completes for all yarn commands and subcommands
- completes default flags
add
recommends packages from cacheremove
|upgrade
|upgrade-interactive
recommends packages from package.json- support
global
completion - support workspaces
Requirements:
- zsh -
Z-shell
Installation
Antigen
Usingantigen bundle chrisands/zsh-yarn-completions
zplug
Usingzplug "chrisands/zsh-yarn-completions", defer:2
Oh My Zsh! as custom plugin
UsingClone zsh-yarn-completion into your custom plugins repo
git clone https://github.com/chrisands/zsh-yarn-completions ~/.oh-my-zsh/custom/plugins/zsh-yarn-completions
Then load as a plugin in your .zshrc
plugins+=(zsh-yarn-completions)
Manually
Clone this repository somewhere (~/.zsh-yarn-completion for example)
git clone https://github.com/chrisands/zsh-yarn-completions.git ~/.zsh-yarn-completions
Then source it in your .zshrc
source ~/.zsh-yarn-completions/zsh-yarn-completions.plugin.zsh
Aliases
Alias | Command |
---|---|
y |
yarn |
yi |
yarn install |
ya |
yarn add |
yad |
yarn add -D |
yga |
yarn global add |
yr |
yarn remove |
ygr |
yarn global remove |
yl |
yarn link |
yu |
yarn unlink |
yw |
yarn workspace |
ywi |
yarn workspaces info |
Roadmap
- suggest unique flags for different commands
-
config
set
|get
suggest config keys (?) -
add
find faster way to fetch from cache - replace
jq
with native tools - add error validation
- add aliases
Contribution
Any contribution are welcome!
License
Acknowledgments
zsh-better-npm-completion — used few function from project and helped understand how to write proper autocompletion system for zsh.