• Stars
    star
    143
  • Rank 257,007 (Top 6 %)
  • Language
    JavaScript
  • Created about 8 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Completion handler for Yarn

yarn-completions

tabtab completion handler for Yarn. Supports bash, zsh or fish.


Install

with npm

npm i -g yarn-completions

On install, the package will add a line to source a SHELL specific config file, into either ~/.bashrc, ~/.zshrc or ~/.config/fish/config.fish.

On uninstall, these lines will be removed.

npm uninstall yarn-completions -g

with yarn

yarn global add yarn-completions

Uninstall, with

yarn global remove yarn-completions

Description

Example of completion results for zsh:

list all available commands and flags

$ yarn
config               clean            check      cache
dedupe               prune            help
generate-lock-entry  global           init       info
--global-folder      access           bin        add
licenses             install          login      link
lockfile             version          upgrade    why
outdated             logout           owner      ls
--prefer-offline     --strict-semver  --offline  --json
publish              remove           pack       run
self-update          unlink           team       tag     --
--help               -h                                  -- output usage information
--modules-folder                                         -- rather than installing modules into the node_modules folder relat
--mutex                                                  -- use a mutex to ensure only one yarn instance is executing
--packages-root                                          -- rather than storing modules into a global packages root, store th
--version            -V                                  -- output the version number

list subcommands and command specific option

$ yarn global
--global-folder   --strict-semver  --json
--prefer-offline  --offline        remove  bin  add  ls  --
--help            -h                                     -- output usage information
--modules-folder                                         -- rather than installing modules into the node_modules folder relat
--mutex                                                  -- use a mutex to ensure only one yarn instance is executing
--packages-root                                          -- rather than storing modules into a global packages root, store th
--version         -V                                     -- output the version number

$ yarn install
--flat                                                         -- only allow one version of a package
--global-folder    --json
--ignore-optional  --ignore-scripts  --force        --prod
--prefer-offline   --strict-semver    --production  --offline  --
--har                                                          -- save HAR output of network traffic
--help             -h                                          -- output usage information
--ignore-engines                                               -- ignore engines check
--modules-folder                                               -- rather than installing modules into the node_modules folder
--mutex                                                        -- use a mutex to ensure only one yarn instance is executing
--no-lockfile                                                  -- don't read or generate a lockfile
--packages-root                                                -- rather than storing modules into a global packages root, st
--pure-lockfile                                                -- don't generate a lockfile
 --save            -S                                          -- DEPRECATED - save package to your `dependencies`
 --save-dev        -D                                          -- DEPRECATED - save package to your `devDependencies`
 --save-exact       --global         -E             -g
 --save-tilde      -T                                          -- DEPRECATED
 --save-optional   -O                                          -- DEPRECATED - save package to your `optionalDependencies`
 --save-peer       -P                                          -- DEPRECATED - save package to your `peerDependencies`
--version          -V                                          -- output the version number

Some commands have more granular completion handlers defined in their own completion file (in lib/completions). Slightly more elaborated completion handlers may be developed for each specific command that would make sense.

yarn config get or yarn config set

$ yarn config set
ignore-optional      ignore-scripts    save-prefix
user-agent           registry
version-git-message  init-license      init-version
version-tag-prefix   version-git-sign  version-git-tag  --

yarn run that completes with package.json's script fields for instance.

$ yarn run
postuninstall  postinstall  prepublish  babel  test
watch                                                --

yarn link completes based off the links found in ~/.yarn-cache/.link.

$ yarn link
yarn-completions  tiny-lr  tabtab  --

yarn unlink completes based off the links found in node_modules folder, and the one found in ~/.yarn-cache/.link

$ yarn unlink
tabtab    --

yarn outdated completes based off dependencies and devDependencies found in project's package.json

$ yarn outdated
babel-preset-es2015  npm-watch  babel-cli  yarn
lodash.intersection  user-home  tabtab     lodash  --

same goes for yarn remove, completing based off dependencies and devDependencies found in project's package.json

$ yarn remove
babel-preset-es2015  npm-watch  babel-cli  yarn
lodash.intersection  user-home  tabtab     lodash  --

yarn why completes all packages found in node_modules folder.

$ yarn why babel-
babel-code-frame                                      babel-cli
babel-generator                                       babel-core
babel-helper-call-delegate                            babel-helper-define-map
babel-helper-get-function-arity                       babel-helper-function-name
babel-helper-optimise-call-expression                 babel-helper-hoist-variables
babel-helper-replace-supers                           babel-helper-regex
babel-messages                                        babel-helpers
babel-plugin-transform-es2015-arrow-functions         babel-plugin-check-es2015-constants
babel-plugin-transform-es2015-block-scoped-functions  babel-plugin-transform-es2015-block-scoping
babel-plugin-transform-es2015-computed-properties     babel-plugin-transform-es2015-classes
babel-plugin-transform-es2015-duplicate-keys          babel-plugin-transform-es2015-destructuring
babel-plugin-transform-es2015-function-name           babel-plugin-transform-es2015-for-of
babel-plugin-transform-es2015-modules-amd             babel-plugin-transform-es2015-literals
babel-plugin-transform-es2015-modules-systemjs        babel-plugin-transform-es2015-modules-commonjs
babel-plugin-transform-es2015-object-super            babel-plugin-transform-es2015-modules-umd
babel-plugin-transform-es2015-shorthand-properties    babel-plugin-transform-es2015-parameters
babel-plugin-transform-es2015-sticky-regex            babel-plugin-transform-es2015-spread
babel-plugin-transform-es2015-template-literals       babel-plugin-transform-es2015-typeof-symbol
babel-plugin-transform-inline-imports-commonjs        babel-plugin-transform-es2015-unicode-regex
babel-plugin-transform-strict-mode                    babel-plugin-transform-regenerator
babel-preset-es2015                                   babel-polyfill
babel-register                                        babel-runtime
babel-traverse                                        babel-template
babel-types

More Repositories

1

tiny-lr

tiny livereload
JavaScript
424
star
2

tabtab

tab completion helpers, for node cli programs & others. Inspired by npm completion
JavaScript
367
star
3

node-build-script

JavaScript
322
star
4

ue4-targetsystemplugin

Dark Souls inspired Camera Lock On / Targeting system plugin
C++
227
star
5

node-fileset

Wrapper around miniglob / minimatch combo to allow multiple patterns matching and include-exclude ability
JavaScript
61
star
6

mocha-gherkin

A little tool to generate Mocha BDD specs from Gherkin features
JavaScript
57
star
7

vim-backbone

Lightweight bag of Vim utilities for Backbone - snipmate snippets, templates and omnicompletion
JavaScript
53
star
8

vimfiles

(n)vim conf, tailored for Onivim
Vim Script
44
star
9

grunt.vim

Vim plugin with support for Grunt
Vim Script
41
star
10

vim-markdown-helpfile

A vim plugin and cli tool to generate vim helpfile from markdown
JavaScript
24
star
11

yeoman-jekyll

Yeoman generators and Grunt tasks to work with Jekyll sites
JavaScript
23
star
12

backnode

Express inspired web development framework, built on Backbone and Connect -- experimental
JavaScript
23
star
13

ue-xelu-icons

Xelu's Controllers & Keyboard Prompts as an Unreal Plugin for programmatic use (cpp / bp)
C++
22
star
14

h5bp-docs

static site generator writen in node designed to work with gollum wikis
JavaScript
19
star
15

make

make is a little experiment to implement a simple task runner similar to Make in JavaScript (WIP)
JavaScript
19
star
16

templatify

Middleware for browserify to load non-js files as pre-compiled handlebars (or underscore) templates.
JavaScript
16
star
17

grunt-plugins

Collection of growing Grunt plugins and utilities
JavaScript
14
star
18

webpagetest-xvfb

Ansible playbook and Vagrant box to run a private WebPagetest server and Chrome agent, running all on one system
12
star
19

gimme-assets

A little, experimental tool to manage web assets from the CLI.
JavaScript
11
star
20

connect-docco

docco + socket.io + watch = Save file β†’ documentation page updates automatically.
JavaScript
10
star
21

vim-cowsay

cowsay.vim: vim plugin for cowsay - someone had to do it (maybe not)
Vim Script
9
star
22

vim-issues

issues.vim: A plugin to quickly navigate through issues of a GitHub repository
Vim Script
9
star
23

make-livereload

Livereload target for Make
JavaScript
9
star
24

mincerize

JavaScript
8
star
25

prometheo

Prometheus REST API client for node and the browser
JavaScript
7
star
26

play-mods

A collection of play! modules/apps
JavaScript
7
star
27

jquery-startr

A starter kit for your jQuery Development
JavaScript
7
star
28

cakes

collection of cake files, mainly trying to learn this cool stuff
CoffeeScript
6
star
29

gentle-cli

CLI assertions made easy
JavaScript
6
star
30

blog.mklog.fr

http://mklabs.github.io/blog.mklog.fr/
JavaScript
6
star
31

noptify

nopt wrapper with commander-like API
JavaScript
6
star
32

jsvim

Exploring an idea - Might be silly but.. What if we could configure and write Vim plugins with nothing but JavaScript?
Vim Script
6
star
33

vim-nodemate

Collection of nodejs snippets, utilities and completion for Vim.
JavaScript
4
star
34

gh-issues-widget

A bit of GitHub API v3, GitHub Flavored Markdown, a soupcon of data-* attributes and you get github issue comment system. Something like that.
JavaScript
4
star
35

greenskin

A WIP monitoring plaform, with a focus on frontend metrics.
JavaScript
4
star
36

docker-receive

git push docker container, build docker image, deploy them
Shell
4
star
37

gitbugs

A little node/git based cli tool to manage issues locally
4
star
38

bbf

Super simplified version of a Form Generator from Backbone.Models attributes.
JavaScript
4
star
39

play-ui-grid

Experience at integrating Play framework with jQuery UI Grid
JavaScript
4
star
40

mockerie

a little tool to generate prototype webapps/websites by mixing raw json data with plates or mustaches - watch and reload.
JavaScript
4
star
41

jquery-ui-widgets

A small collection of jQuery UI widgets I casually made.
JavaScript
4
star
42

gpos

Element package for GitHub Pages based on fetch() and GitHub code search API
JavaScript
3
star
43

dotfiles

!stow
Shell
3
star
44

wheats

Stuff related to wheat blog engine, mostly about custom themes.
JavaScript
3
star
45

npfm

Modding toolbox for Total War Warhammer II
JavaScript
3
star
46

h5bp-build-script-tags

#831 Extending the build script functionality - jsdom/jquery + build script experiment.
JavaScript
3
star
47

quizzie-bot

Quizz Discord Bot, aka trivial pursuit, in french.
JavaScript
3
star
48

jquery-plugs

A small collection of jQuery plugins I casually made.
JavaScript
3
star
49

ue4-CSSColorsGrid

Set of Grid Materials for Greyboxing / Blockout
Python
3
star
50

snipmate-css3-please

A collection of css3please based snippets for snipmate
3
star
51

node-datauris

script to automate embedding of base64 images in CSS files
JavaScript
3
star
52

foofiles

Personal playground. Experiments, growing packages and uselessware.
JavaScript
2
star
53

nabe-demo

a simple repository to get started with nabe
JavaScript
2
star
54

template-stream

Streaming ability for various template engines
JavaScript
2
star
55

jekyll-preview

A WIP server with the minimal amount of Jekyll features to quickly preview Jekyll sites locally
JavaScript
2
star
56

hyperx-transforms

hyperx middleware like transforms
JavaScript
2
star
57

gistmailer

Send HTML formatted email alerts
JavaScript
1
star
58

yov

A WIP View component for yo-yo / bel
JavaScript
1
star
59

box

Installation scripts to setup a new environment (Arch Linux Manjaro)
Shell
1
star
60

prometheus-prebuilt

Install prometheus prebuilt binaries using npm (https://prometheus.io/)
JavaScript
1
star
61

vim-node-eval

node -pe for vim
Vim Script
1
star
62

140-opts

140 bytes fancy node option parsing. It doesn't do much, but it fits in a tweet.
JavaScript
1
star
63

tiny-lr-cli

CLI part of tiny-lr and basic dashboard
JavaScript
1
star
64

AGRExtensions

UE4 plugin working in tandem with AGR Pro and providing several useful extensions to AGR.
C++
1
star
65

roar

CLI utilities / helpers based on meow and minimist
JavaScript
1
star
66

watchd

Tiny wrapper around gaze / module-deps combo to re-run command(s) on file changes (WIP)
JavaScript
1
star
67

mklabs.github.com

My website
HTML
1
star
68

grunt-help

Get help on grunt
JavaScript
1
star
69

wd-gherkin

Basic cucumber impl. based on Mocha, Phantom and Webdriver
JavaScript
1
star
70

gitbook-completions

Tabtab completions package for gitbook-cli
JavaScript
1
star
71

ghv3

GitHub Api v3 library. Ideally, it should work in node via http request, and in browsers using jsonp.
JavaScript
1
star
72

formations

Code for various training
JavaScript
1
star
73

dploy

Quick and Dirty static site deployment on Amazon S3, Rackspace Cloudfiles or Github Pages
JavaScript
1
star
74

wh2_modding_res

Internal storage of the modding den's Modding Resources webpage!
HTML
1
star