bun.plugin.zsh
427 bytes
1# If Bun is not found, don't do the rest of the script
2if (( ! $+commands[bun] )); then
3 return
4fi
5
6# If the completion file doesn't exist yet, we need to autoload it and
7# bind it to `bun`. Otherwise, compinit will have already done that.
8if [[ ! -f "$ZSH_CACHE_DIR/completions/_bun" ]]; then
9 typeset -g -A _comps
10 autoload -Uz _bun
11 _comps[bun]=_bun
12fi
13
14SHELL=zsh bun completions >| "$ZSH_CACHE_DIR/completions/_bun" &|