2024-01-03 04:02:43 -08:00
|
|
|
if (( ! $+commands[mise] )); then
|
2026-01-08 13:43:14 +03:00
|
|
|
return
|
2024-01-03 04:02:43 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Load mise hooks
|
2026-01-08 13:43:14 +03:00
|
|
|
eval "$(mise activate zsh)"
|
2024-03-21 19:46:40 +00:00
|
|
|
|
2024-01-03 04:02:43 -08:00
|
|
|
# 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.
|
2026-01-08 13:43:14 +03:00
|
|
|
if [[ ! -f "$ZSH_CACHE_DIR/completions/_mise" ]]; then
|
2024-01-03 04:02:43 -08:00
|
|
|
typeset -g -A _comps
|
2026-01-08 13:43:14 +03:00
|
|
|
autoload -Uz _mise
|
|
|
|
|
_comps[mise]=_mise
|
2024-01-03 04:02:43 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Generate and load mise completion
|
2026-01-08 13:43:14 +03:00
|
|
|
mise completion zsh >| "$ZSH_CACHE_DIR/completions/_mise" &|
|