fix(fnm): load managed Node from always-on zsh layer
fnm lived in interactive-only ~/.config/zshrc, so ssh/agents/zsh -c missed fnm-managed node. Source ~/.config/zsh/*.zsh from .zshenv and install the fragment as zsh/fnm instead.
This commit is contained in:
+5
-3
@@ -88,11 +88,13 @@ fi
|
||||
# fnm use lts-latest
|
||||
# fnm default lts-latest
|
||||
|
||||
# Apply the fnm zsh configuration patch (downloads zshrc/fnm.zsh to ~/.config/zshrc/fnm.zsh)
|
||||
curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s -- fnm
|
||||
# Always-on fragment: ~/.config/zsh/fnm.zsh (sourced from ~/.zshenv)
|
||||
curl -fsSL https://git.miomio.moe/mio/easyzsh/raw/branch/master/patch.sh | bash -s -- zsh/fnm
|
||||
# Drop legacy interactive-only copy if present
|
||||
rm -f "${XDG_CONFIG_HOME:-$HOME/.config}/zshrc/fnm.zsh"
|
||||
|
||||
echo -e "\nfnm installation completed!"
|
||||
echo -e "To start using fnm, restart your terminal or run: source ~/.zshrc"
|
||||
echo -e "To start using fnm, restart your terminal or run: source ~/.zshenv"
|
||||
echo -e "\nUseful fnm commands:"
|
||||
echo -e " fnm install --lts # Install latest LTS Node.js"
|
||||
echo -e " fnm use lts-latest # Use the latest LTS release"
|
||||
|
||||
Reference in New Issue
Block a user