项目作者: chrisands

项目描述 :
Yarn completions for Z-shell that supports yarn workspaces
高级语言: Shell
项目地址: git://github.com/chrisands/zsh-yarn-completions.git
创建时间: 2019-03-12T17:22:06Z
项目社区:https://github.com/chrisands/zsh-yarn-completions

开源协议:MIT License

下载


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 cache
  • remove | upgrade | upgrade-interactive recommends packages from package.json
  • support global completion
  • support workspaces

Requirements:

Installation

Using Antigen

  1. antigen bundle chrisands/zsh-yarn-completions

Using zplug

  1. zplug "chrisands/zsh-yarn-completions", defer:2

Using Oh My Zsh! as custom plugin

Clone zsh-yarn-completion into your custom plugins repo

  1. 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

  1. plugins+=(zsh-yarn-completions)

Manually

Clone this repository somewhere (~/.zsh-yarn-completion for example)

  1. git clone https://github.com/chrisands/zsh-yarn-completions.git ~/.zsh-yarn-completions

Then source it in your .zshrc

  1. 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

MIT

Acknowledgments

zsh-better-npm-completion — used few function from project and helped understand how to write proper autocompletion system for zsh.