formatted lerna completion and used helper function
This commit is contained in:
committed by
Noah Gorny
parent
28b2a2ba2b
commit
69e5a28ed3
@@ -1,19 +1,21 @@
|
||||
#!/bin/bash
|
||||
# Lerna autocompletion.
|
||||
function _lerna_completions() {
|
||||
local cur compls
|
||||
# shellcheck shell=bash
|
||||
cite "about-completion"
|
||||
about-completion "lerna(javascript project manager tool) completion"
|
||||
|
||||
# The currently-being-completed word.
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
function __lerna_completion() {
|
||||
local cur compls
|
||||
|
||||
# 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"
|
||||
# The currently-being-completed word.
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
# Tell complete what stuff to show.
|
||||
COMPREPLY=($(compgen -W "$compls" -- "$cur"))
|
||||
# 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
|
||||
complete -o default -F __lerna_completion lerna
|
||||
|
||||
Reference in New Issue
Block a user