Merge pull request #1248 from willb611/lerna-completions

Lerna completions
pull/1249/head
Nils Winkler 2018-10-26 11:05:13 +02:00 committed by GitHub
commit 63c47f2438
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/bin/bash
# Lerna autocompletion.
function _lerna_completions() {
local cur compls
# The currently-being-completed word.
cur="${COMP_WORDS[COMP_CWORD]}"
# Options
compls="add bootstrap changed clean create diff exec \
import init link list publish run version \
--loglevel --concurrency --reject-cycles \
--progress --sort --no-sort --help \
--version"
# Tell complete what stuff to show.
COMPREPLY=($(compgen -W "$compls" -- "$cur"))
}
complete -o default -F _lerna_completions lerna