diff --git a/config/rtx/config.toml b/config/mise/config.toml similarity index 100% rename from config/rtx/config.toml rename to config/mise/config.toml diff --git a/default-gems b/default-gems index e990f61..3c99e41 100644 --- a/default-gems +++ b/default-gems @@ -1,3 +1,3 @@ -# Default Gems installed by rtx when installing new Ruby versions. +# Default Gems installed by mise when installing new Ruby versions. foreman rubocop diff --git a/default-go-packages b/default-go-packages index 5f4c8a6..30a70cb 100644 --- a/default-go-packages +++ b/default-go-packages @@ -1,4 +1,4 @@ -# Default Go packages installed by rtx when installing new Go versions. +# Default Go packages installed by mise when installing new Go versions. github.com/nametake/golangci-lint-langserver@latest golang.org/x/tools/cmd/goimports@latest golang.org/x/tools/gopls@latest diff --git a/install.sh b/install.sh index b326f44..9122509 100755 --- a/install.sh +++ b/install.sh @@ -15,7 +15,7 @@ SYMLINKS=( bitbar coffeelint.json config/kitty/kitty.conf - config/rtx/config.toml + config/mise/config.toml config/solargraph/config.yml config/starship.toml default-gems diff --git a/zsh/kubernetes.zsh b/zsh/kubernetes.zsh index 85e6553..81ee2fa 100644 --- a/zsh/kubernetes.zsh +++ b/zsh/kubernetes.zsh @@ -52,7 +52,7 @@ fi _setup-kubectx-completion() { local cmd="$1" - local dir="$HOME/.local/share/rtx/installs/kubectx/latest/completion" + local dir="$HOME/.local/share/mise/installs/kubectx/latest/completion" local target="$ZSH_COMPLETIONS/_${cmd}" if [ -f "$target" ] || [ ! -d "$dir" ]; then @@ -74,10 +74,10 @@ _setup-kubectx-completion() { autoload -U compinit && compinit } -if command-exists kubectx && ! which _kubectx &> /dev/null; then +if command-exists kubectx; then _setup-kubectx-completion kubectx fi -if command-exists kubens && ! which _kubens &> /dev/null; then +if command-exists kubens; then _setup-kubectx-completion kubens fi diff --git a/zshenv b/zshenv index ad8b652..d253d9f 100644 --- a/zshenv +++ b/zshenv @@ -230,9 +230,9 @@ if command-exists sccache; then export RUSTC_WRAPPER=sccache fi -# rtx setup -path_prepend "$HOME/.local/share/rtx/bin" -path_prepend "$HOME/.local/share/rtx/shims" +# mise setup +path_prepend "$HOME/.local/share/mise/bin" +path_prepend "$HOME/.local/share/mise/shims" # orbstack setup source-if-exists "$HOME/.orbstack/shell/init.zsh" diff --git a/zshrc b/zshrc index 5c8c5b7..12e07e6 100644 --- a/zshrc +++ b/zshrc @@ -91,25 +91,31 @@ if command-exists direnv; then eval "$(direnv hook zsh)" fi -RTX_HOME="$HOME/.local/share/rtx" -RTX_INIT="$RTX_HOME/shell/init.zsh" -export RTX_INSTALL_PATH="$RTX_HOME/bin/rtx" +MISE_HOME="$HOME/.local/share/mise" +MISE_INIT="$MISE_HOME/shell/init.zsh" +MISE_COMPLETIONS_PATH="${ZSH_COMPLETIONS}/_mise" +export MISE_INSTALL_PATH="$MISE_HOME/bin/mise" -if ! command-exists rtx; then - read -q 'REPLY?rtx is not installed, install with `curl https://rtx.pub/install.sh | sh`? [y/N]:' && - echo && curl https://rtx.pub/install.sh | sh +if ! command-exists mise; then + read -q 'REPLY?mise is not installed, install with `curl https://mise.jdx.dev/install.sh | sh`? [y/N]:' && + echo && curl https://mise.jdx.dev/install.sh | sh fi -if [ -f "$HOME/.local/share/rtx/bin/rtx" ]; then - path_prepend "$RTX_HOME/bin" -fi +if command-exists mise; then + alias mi="mise" -if command-exists rtx; then - if [ ! -f "$RTX_INIT" ] || [ "$RTX_INIT" -ot "$RTX_INSTALL_PATH" ]; then - mkdir -p "$(dirname "$RTX_INIT")" - rtx activate zsh > "$RTX_INIT" + if [ ! -f "$MISE_INIT" ] || [ "$MISE_INIT" -ot "$MISE_INSTALL_PATH" ]; then + mkdir -p "$(dirname "$MISE_INIT")" + mise activate zsh > "$MISE_INIT" + fi + source "$MISE_INIT" + + if [ ! -f "$MISE_COMPLETIONS_PATH" ] || [ "$MISE_COMPLETIONS_PATH" -ot "$MISE_INSTALL_PATH" ]; then + echo "Setting up completion for mise -- $MISE_COMPLETIONS_PATH" + mkdir -p "$(dirname "$MISE_COMPLETIONS_PATH")" + mise completions zsh > "$MISE_COMPLETIONS_PATH" + chmod +x "$MISE_COMPLETIONS_PATH" fi - source "$RTX_INIT" fi # ============================================================================== @@ -117,8 +123,8 @@ fi # ============================================================================== if ! command-exists starship; then - read -q 'REPLY?starship is not installed, install with `rtx install starship`? [y/N]:' && - echo && rtx install starship + read -q 'REPLY?starship is not installed, install with `mise install starship`? [y/N]:' && + echo && mise install starship fi if command-exists starship; then @@ -131,7 +137,7 @@ if command-exists starship; then compctl -K _starship starship else echo "WARN: starship not found, skipping prompt setup" >&2 - echo " install with: rtx install starship" >&2 + echo " install with: mise install starship" >&2 fi