oh-my-zsh/plugins/gulp/gulp.plugin.zsh

30 lines
527 B
Bash
Raw Normal View History

2014-09-01 13:12:36 +00:00
#!/usr/bin/env zsh
#
# gulp-autocompletion-zsh
#
2014-09-01 13:12:36 +00:00
# Autocompletion for your gulp.js tasks
#
# Copyright(c) 2014 André König <andre.koenig@posteo.de>
# MIT Licensed
#
2014-09-01 13:12:36 +00:00
#
# André König
# Github: https://github.com/akoenig
# Twitter: https://twitter.com/caiifr
#
#
# Grabs all available tasks from the `gulpfile.js`
# in the current directory.
#
function $$gulp_completion {
2015-12-15 10:41:36 +00:00
local compls=$(gulp --tasks-simple 2>/dev/null)
2014-09-01 13:12:36 +00:00
2015-12-15 10:41:36 +00:00
local completions=(${=compls})
2014-09-01 13:12:36 +00:00
compadd -- $completions
}
compdef $$gulp_completion gulp