Update bashrc for fnm.

This commit is contained in:
Gea-Suan Lin
2024-09-15 09:04:34 +08:00
parent d50df41efb
commit 5d91e8a60d

View File

@@ -20,7 +20,11 @@ if [ -d "${PYENV_ROOT}" ]; then
eval "$(pyenv init - --no-rehash)" eval "$(pyenv init - --no-rehash)"
fi fi
# #
[ -s "${HOME}/.fnm/fnm" ] && eval "$(${HOME}/.fnm/fnm env)" && export PATH="${HOME}/.fnm:${PATH}" if [[ -x "${HOME}/.fnm/fnm" ]]; then
eval "$(${HOME}/.fnm/fnm env --use-on-cd)" && export PATH="${HOME}/.fnm:${PATH}"
elif [[ -x "/opt/homebrew/bin/fnm" ]]; then
eval "$(/opt/homebrew/bin/fnm env --use-on-cd)"
fi
# #
if [ -d "${HOME}/.rbenv" ]; then if [ -d "${HOME}/.rbenv" ]; then
if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.rbenv/bin(:|$)" ]]; then if [[ ! "${PATH}" =~ "(^|:)${HOME}/\\.rbenv/bin(:|$)" ]]; then