2
0

chezmoi.plugin.zsh 419 B

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