prezto/modules/node/functions/_grunt
Indrajit Raychaudhuri 9f37fc9841 node: Optimize completions for loading lazily on demand
Move `grunt` and `gulp` to separate completion definitions wrapping
`grunt --completion=zsh` and `gulp --completion=zsh` respectively.

Since the completions are loaded lazily on demand, they avoid the
performance overhead during Zsh initialization.

Additionally, remove `npm` completion since it is already bundled with
Zsh for quite a while.
2021-05-21 13:39:23 -05:00

16 lines
257 B
Plaintext

#compdef grunt
#autoload
#
# Grunt completion, delegating to grunt to do all the completion work.
#
# Authors:
# Indrajit Raychaudhuri <irc@indrajit.com>
#
if (( $+commands[grunt] )); then
eval "$(grunt --completion=zsh)"
_grunt_completion "$@"
fi