nats.plugin.zsh
756 bytes
1if (( $+commands[nsc] )); then
2 # If the completion file doesn't exist yet, we need to autoload it and
3 # bind it to `nsc`. Otherwise, compinit will have already done that.
4 if [[ ! -f "$ZSH_CACHE_DIR/completions/_nsc" ]]; then
5 typeset -g -A _comps
6 autoload -Uz _nsc
7 _comps[nsc]=_nsc
8 fi
9
10 nsc completion zsh >| "$ZSH_CACHE_DIR/completions/_nsc" &|
11fi
12
13if (( $+commands[nats] )); then
14 # If the completion file doesn't exist yet, we need to autoload it and
15 # bind it to `nats`. Otherwise, compinit will have already done that.
16 if [[ ! -f "$ZSH_CACHE_DIR/completions/_nats" ]]; then
17 typeset -g -A _comps
18 autoload -Uz _nats
19 _comps[nats]=_nats
20 fi
21
22 nats --completion-script-zsh >| "$ZSH_CACHE_DIR/completions/_nats" &|
23fi