formatted gulp completion and used helper function
parent
475393c6b7
commit
538c19b32f
|
|
@ -39,6 +39,9 @@
|
|||
#
|
||||
# eval "$(gulp --completion=bash)"
|
||||
# Enable bash autocompletion.
|
||||
|
||||
if _command_exists gulp
|
||||
then
|
||||
function _gulp_completions() {
|
||||
# The currently-being-completed word.
|
||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
|
@ -48,3 +51,4 @@ local compls=$(gulp --tasks-simple)
|
|||
COMPREPLY=($(compgen -W "$compls" -- "$cur"))
|
||||
}
|
||||
complete -o default -F _gulp_completions gulp
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue