fix(mise)!: remove unneeded hook-env call (#13491)

BREAKING CHANGE: Backwards compatibility for `rtx` has been removed.
Please migrate to `mise` if you are affected by this change.
This commit is contained in:
Halil Özgür
2026-01-08 13:43:14 +03:00
committed by GitHub
parent 6634f44826
commit ed21aa1961

View File

@@ -1,27 +1,17 @@
# TODO: 2024-01-03 remove rtx support
local __mise=mise
if (( ! $+commands[mise] )); then
if (( $+commands[rtx] )); then
__mise=rtx
else
return
fi
return
fi
# Load mise hooks
eval "$($__mise activate zsh)"
# Hook mise into current environment
eval "$($__mise hook-env -s zsh)"
eval "$(mise activate zsh)"
# 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/_$__mise" ]]; then
if [[ ! -f "$ZSH_CACHE_DIR/completions/_mise" ]]; then
typeset -g -A _comps
autoload -Uz _$__mise
_comps[$__mise]=_$__mise
autoload -Uz _mise
_comps[mise]=_mise
fi
# Generate and load mise completion
$__mise completion zsh >| "$ZSH_CACHE_DIR/completions/_$__mise" &|
unset __mise
mise completion zsh >| "$ZSH_CACHE_DIR/completions/_mise" &|