mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-29 19:14:05 +08:00
21 lines
585 B
Bash
21 lines
585 B
Bash
if (( ! $+commands[fnox] )); then
|
|
# if we don't have fnox at all just bail out
|
|
return
|
|
fi
|
|
|
|
if (( ! $+commands[mise] )); then
|
|
# if we have fnox but not mise, source its activation directly
|
|
eval "$(fnox activate zsh)"
|
|
fi
|
|
|
|
# If the completion file doesn't exist yet, we need to autoload it and
|
|
# bind it to `mise`. Otherwise, compinit will have already done that.
|
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_fnox" ]]; then
|
|
typeset -g -A _comps
|
|
autoload -Uz _fnox
|
|
_comps[fnox]=_fnox
|
|
fi
|
|
|
|
# Generate and load completions
|
|
fnox completion zsh >| "$ZSH_CACHE_DIR/completions/_fnox" &|
|