Move nvm setup to .bash_profile instead of .bashrc

This commit is contained in:
Jeremy Dormitzer 2020-02-01 21:00:46 -05:00
parent c07a0f2e26
commit ab967fcd17
2 changed files with 12 additions and 12 deletions

View File

@ -2,6 +2,18 @@
# $HOME/.bash_profile
#
if [ -f /usr/share/nvm/init-nvm.sh ];
then
source /usr/share/nvm/init-nvm.sh
fi
if [ -d "$HOME/.nvm" ];
then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
fi
[[ -f "$HOME/.bashrc" ]] && source $HOME/.bashrc
[[ -f "$HOME/.bash_local" ]] && source "$HOME/.bash_local"

View File

@ -8,11 +8,6 @@
alias ls='ls -G'
PS1='[\u@\h \W]\$ '
if [ -f /usr/share/nvm/init-nvm.sh ];
then
source /usr/share/nvm/init-nvm.sh
fi
if [ -x "$(command -v direnv)" ];
then
eval "$(direnv hook bash)"
@ -20,13 +15,6 @@ fi
alias edit="$(which emacsclient) "
if [ -d "$HOME/.nvm" ];
then
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
fi
if [ -f ~/.bashrc.local ];
then
source ~/.bashrc.local