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