fix(rtx)!: rename rtx plugin to mise (#12143)

BREAKING CHANGE: Rename `rtx` plugin to `mise`. The project swapped name
in `v2024.1.0`. Replace references to `rtx` with `mise` while
maintaining backwards compatibility for `rtx` installations.

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
Jared Allard 2024-01-03 04:02:43 -08:00 committed by GitHub
commit b5583a3216
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 48 deletions

View file

@ -0,0 +1,23 @@
# TODO: 2024-01-03 remove rtx support
local __mise=mise
if (( ! $+commands[mise] )); then
if (( $+commands[rtx] )); then
__mise=rtx
else
return
fi
fi
# Load mise hooks
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
typeset -g -A _comps
autoload -Uz _$__mise
_comps[$__mise]=_$__mise
fi
# Generate and load mise completion
$__mise completion zsh >| "$ZSH_CACHE_DIR/completions/_$__mise" &|