fe9ff63ced777d6548694e9b8008472c5e1a6594

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Merge pull request #4463 from giordanovi/master

Fetch Gulp tasks list in a better way

Diff

 1diff --git a/plugins/gulp/gulp.plugin.zsh b/plugins/gulp/gulp.plugin.zsh
 2index f7eaefa85b63cc844e445a310e61a274dcffadea..e941d5a6abbe451b8c43eda0ca0070927e548859 100644
 3--- a/plugins/gulp/gulp.plugin.zsh
 4+++ b/plugins/gulp/gulp.plugin.zsh
 5@@ -2,12 +2,12 @@
 6 
 7 #
 8 # gulp-autocompletion-zsh
 9-# 
10+#
11 # Autocompletion for your gulp.js tasks
12 #
13 # Copyright(c) 2014 André König <andre.koenig@posteo.de>
14 # MIT Licensed
15-# 
16+#
17 
18 #
19 # André König
20@@ -20,9 +20,9 @@
21 # in the current directory.
22 #
23 function $$gulp_completion {
24-    compls="$(grep -Eo "gulp.task\((['\"](([a-zA-Z0-9]|-)*)['\"],)" gulpfile.js 2>/dev/null | grep -Eo "['\"](([a-zA-Z0-9]|-)*)['\"]" | sed s/"['\"]"//g | sort)"
25+    local compls=$(gulp --tasks-simple 2>/dev/null)
26 
27-    completions=(${=compls})
28+    local completions=(${=compls})
29     compadd -- $completions
30 }
31