From ee8f3771e93c940cd1271dad0a6e9b6ab7cad0c4 Mon Sep 17 00:00:00 2001 From: Giordano Vicari Date: Mon, 5 Oct 2015 19:44:00 +0200 Subject: [PATCH 1/3] Added support to subtask through gulp --tasks-simple command --- plugins/gulp/gulp.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/gulp/gulp.plugin.zsh b/plugins/gulp/gulp.plugin.zsh index f7eaefa85..587549526 100644 --- a/plugins/gulp/gulp.plugin.zsh +++ b/plugins/gulp/gulp.plugin.zsh @@ -2,12 +2,12 @@ # # gulp-autocompletion-zsh -# +# # Autocompletion for your gulp.js tasks # # Copyright(c) 2014 André König # MIT Licensed -# +# # # André König @@ -20,7 +20,7 @@ # in the current directory. # function $$gulp_completion { - compls="$(grep -Eo "gulp.task\((['\"](([a-zA-Z0-9]|-)*)['\"],)" gulpfile.js 2>/dev/null | grep -Eo "['\"](([a-zA-Z0-9]|-)*)['\"]" | sed s/"['\"]"//g | sort)" + compls=$(gulp --tasks-simple >/dev/null | sort) completions=(${=compls}) compadd -- $completions From 8042394c7892b06d08e01907ab5d9887c10a252f Mon Sep 17 00:00:00 2001 From: Giordano Vicari Date: Tue, 15 Dec 2015 11:14:25 +0100 Subject: [PATCH 2/3] Update gulp.plugin.zsh Sort pipe dropped and fix 2>/dev/null --- plugins/gulp/gulp.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gulp/gulp.plugin.zsh b/plugins/gulp/gulp.plugin.zsh index 587549526..2b3105135 100644 --- a/plugins/gulp/gulp.plugin.zsh +++ b/plugins/gulp/gulp.plugin.zsh @@ -20,7 +20,7 @@ # in the current directory. # function $$gulp_completion { - compls=$(gulp --tasks-simple >/dev/null | sort) + compls=$(gulp --tasks-simple 2>/dev/null) completions=(${=compls}) compadd -- $completions From 4f314e2a326a0b0934ed7df214b24c2b91f1c82d Mon Sep 17 00:00:00 2001 From: Giordano Vicari Date: Tue, 15 Dec 2015 11:41:36 +0100 Subject: [PATCH 3/3] Update gulp.plugin.zsh Add local stuff --- plugins/gulp/gulp.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gulp/gulp.plugin.zsh b/plugins/gulp/gulp.plugin.zsh index 2b3105135..e941d5a6a 100644 --- a/plugins/gulp/gulp.plugin.zsh +++ b/plugins/gulp/gulp.plugin.zsh @@ -20,9 +20,9 @@ # in the current directory. # function $$gulp_completion { - compls=$(gulp --tasks-simple 2>/dev/null) + local compls=$(gulp --tasks-simple 2>/dev/null) - completions=(${=compls}) + local completions=(${=compls}) compadd -- $completions }