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