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