2
0

nats.plugin.zsh 756 B

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