1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-23 21:01:58 +00:00

Merge pull request #3630 from designorant/grunt-plugin-update

Update Grunt plugin to 0.1.2
This commit is contained in:
Robby Russell 2015-02-23 07:29:55 -08:00
commit 1dcc81cda0

View file

@ -1,4 +1,5 @@
#compdef grunt #compdef grunt
#autoload
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# _grunt # _grunt
# #
@ -8,11 +9,11 @@
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# #
# Version : 0.1.0 # Version : 0.1.2
# Author : Yonchu <yuyuchu3333@gmail.com> # Author : Yonchu <yuyuchu3333@gmail.com>
# License : MIT License # License : MIT License
# Repository : https://github.com/yonchu/grunt-zsh-completion # Repository : https://github.com/yonchu/grunt-zsh-completion
# Last Change : 22 Jul 2013. # Last Change : 20 Aug 2014.
# #
# Copyright (c) 2013 Yonchu. # Copyright (c) 2013 Yonchu.
# #
@ -46,7 +47,7 @@
# #
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
function _grunt() { function __grunt() {
local curcontext="$curcontext" update_policy state local curcontext="$curcontext" update_policy state
local show_grunt_path update_msg gruntfile opts tasks local show_grunt_path update_msg gruntfile opts tasks
@ -113,7 +114,7 @@ function _grunt() {
# The cache variable name: __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks # The cache variable name: __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks
function __grunt_update_cache() { function __grunt_update_cache() {
# TODO # TODO
local version='0.1.0' local version='0.1.2'
local is_updating=0 local is_updating=0
local gruntfile="$1" local gruntfile="$1"
local grunt_info no_update_options cache_path local grunt_info no_update_options cache_path
@ -177,6 +178,7 @@ function __grunt_get_tasks() {
| grep 'Available tasks' -A 100 \ | grep 'Available tasks' -A 100 \
| grep '^ ' \ | grep '^ ' \
| sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' \ | sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' \
| sed -e 's/:/\\:/g' \
| sed -e 's/ /:/' | sed -e 's/ /:/'
} }
@ -250,4 +252,4 @@ function __grunt_caching_policy() {
(( $#oldp )) (( $#oldp ))
} }
compdef _grunt grunt compdef __grunt grunt