gulp.plugin.zsh
513 bytes
1#!/usr/bin/env zsh
2
3#
4# gulp-autocompletion-zsh
5#
6# Autocompletion for your gulp.js tasks
7#
8# Copyright(c) 2014 André König <andre.koenig@posteo.de>
9# MIT Licensed
10#
11
12#
13# André König
14# GitHub: https://github.com/akoenig
15# Twitter: https://twitter.com/caiifr
16#
17
18#
19# Grabs all available tasks from the `gulpfile.js`
20# in the current directory.
21#
22function _gulp_completion {
23 compls=$(gulp --tasks-simple 2>/dev/null)
24
25 completions=(${=compls})
26 compadd -- $completions
27}
28
29compdef _gulp_completion gulp