From 10144dfa161e087dc50e135b9b83541340f8ce6f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 13 Jan 2025 19:56:30 +0000 Subject: [PATCH] fix(zsh/mise): switch back to normal interactive init Previously the interactive init would not update PATH immediately, causing the rest of the zshrc file to fail to find any tools installed with mise. This longer seems to be an issue. --- zshrc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/zshrc b/zshrc index 98f6c62..fde9c17 100644 --- a/zshrc +++ b/zshrc @@ -238,8 +238,12 @@ if ! command-exists mise; then fi if command-exists mise; then - alias mi="mise" + # Activate mise. We cannot use cached-eval here as the activation script + # dynamically adjusts how it modifies PATH on each invocation. + eval "$("$MISE_INSTALL_PATH" activate zsh)" setup-completions mise "$MISE_INSTALL_PATH" mise completions zsh + + alias mi="mise" fi # ============================================================================== @@ -316,13 +320,6 @@ unsetopt share_history # Disable attempted correction of commands (is wrong 98% of the time). unsetopt correctall -# ============================================================================== -# Prepare interactive environment -# ============================================================================== - -# Activate mise properly for interactive use not using shims. -eval "$("$MISE_INSTALL_PATH" activate zsh)" - # ============================================================================== # Local Overrides # ==============================================================================