mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
refactor(mise)!: Remove rtx support and hook-env
BREAKING CHANGE: rtx support has been removed. Please visit https://mise.jdx.dev/rtx.html for migration instructions. `mise activate` already calls hook-env (unless --no-hook-env is passed).
This commit is contained in:
parent
0f45f82c0a
commit
a79fe8f3d4
1 changed files with 6 additions and 16 deletions
|
|
@ -1,27 +1,17 @@
|
||||||
# TODO: 2024-01-03 remove rtx support
|
|
||||||
local __mise=mise
|
|
||||||
if (( ! $+commands[mise] )); then
|
if (( ! $+commands[mise] )); then
|
||||||
if (( $+commands[rtx] )); then
|
|
||||||
__mise=rtx
|
|
||||||
else
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
# Load mise hooks
|
# Load mise hooks
|
||||||
eval "$($__mise activate zsh)"
|
eval "$(mise activate zsh)"
|
||||||
|
|
||||||
# Hook mise into current environment
|
|
||||||
eval "$($__mise hook-env -s zsh)"
|
|
||||||
|
|
||||||
# If the completion file doesn't exist yet, we need to autoload it and
|
# 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.
|
# 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
|
typeset -g -A _comps
|
||||||
autoload -Uz _$__mise
|
autoload -Uz _mise
|
||||||
_comps[$__mise]=_$__mise
|
_comps[mise]=_mise
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Generate and load mise completion
|
# Generate and load mise completion
|
||||||
$__mise completion zsh >| "$ZSH_CACHE_DIR/completions/_$__mise" &|
|
mise completion zsh >| "$ZSH_CACHE_DIR/completions/_mise" &|
|
||||||
unset __mise
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue