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