3 # Borrowed from grunt-cli
6 # Copyright (c) 2012 Tyler Kellen, contributors
7 # Licensed under the MIT license.
8 # https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
12 # To enable bash <tab> completion for gulp, add the following line (minus the
13 # leading #, which is the bash comment character) to your ~/.bashrc file:
15 # eval "$(gulp --completion=bash)"
17 # Enable bash autocompletion.
18 function _gulp_completions() {
19 # The currently-being-completed word.
20 local cur="${COMP_WORDS[COMP_CWORD]}"
22 local compls=$(gulp --tasks-simple)
23 # Tell complete what stuff to show.
24 COMPREPLY=($(compgen -W "$compls" -- "$cur"))
27 complete -o default -F _gulp_completions gulp