formatted lerna completion and used helper function

pull/1782/head
Gurkirat Singh 2021-01-10 19:29:43 +05:30
parent 244c6a62b5
commit 3ed0063fa6
No known key found for this signature in database
GPG Key ID: CFD64E1DCB3DA835
1 changed files with 18 additions and 14 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# Lerna autocompletion. # Lerna autocompletion.
if _command_exists lerna
then
function _lerna_completions() { function _lerna_completions() {
local cur compls local cur compls
@ -17,3 +20,4 @@ function _lerna_completions() {
COMPREPLY=($(compgen -W "$compls" -- "$cur")) COMPREPLY=($(compgen -W "$compls" -- "$cur"))
} }
complete -o default -F _lerna_completions lerna complete -o default -F _lerna_completions lerna
fi