diff --git a/src/_gulp b/src/_gulp new file mode 100644 index 0000000..8ca70f8 --- /dev/null +++ b/src/_gulp @@ -0,0 +1,24 @@ +#compdef gulp +# ------------------------------------------------------------------------------ +# Description +# ----------- +# +# Completion script for Gulp (http://gulpjs.com/). +# +# ------------------------------------------------------------------------------ +# Authors +# ------- +# +# * Yohan Tambè (https://github.com/cronos87) +# +# ------------------------------------------------------------------------------ + +_gulp_get_command_list () { + cat gulpfile.js | grep "gulp.task" | grep -o "'[a-z:]*'" | sed "s/\'//g" +} + +_gulp () { + compadd `_gulp_get_command_list` +} + +compdef _gulp gulp