1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 10:29:25 +00:00

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.
This commit is contained in:
Indrajit Raychaudhuri
2021-05-15 14:59:31 -05:00
committed by Indrajit Raychaudhuri
parent f84075b8d4
commit 9f37fc9841
4 changed files with 34 additions and 27 deletions

View File

@ -0,0 +1,15 @@
#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