arduino-cli.plugin.zsh 472 B

1234567891011121314
  1. if (( ! $+commands[arduino-cli] )); then
  2. return
  3. fi
  4. # If the completion file doesn't exist yet, we need to autoload it and
  5. # bind it to `arduino-cli`. Otherwise, compinit will have already done that.
  6. if [[ ! -f "$ZSH_CACHE_DIR/completions/_arduino-cli" ]]; then
  7. typeset -g -A _comps
  8. autoload -Uz _arduino-cli
  9. _comps[arduino-cli]=_arduino-cli
  10. fi
  11. # Generate and load arduino-cli completion
  12. arduino-cli completion zsh >! "$ZSH_CACHE_DIR/completions/_arduino-cli" &|