Browse Source

add chpwd helper for nvm

pull/1/head
Brett Langdon 10 years ago
parent
commit
2ca1709f62
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      zshrc

+ 8
- 2
zshrc View File

@ -39,16 +39,22 @@ alias stayawake="caffeinate -s -d -i"
export PATH="/usr/local/heroku/bin:$PATH"
# Setup RVM
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH="$HOME/.rvm/bin:$PATH" # Add RVM to PATH for scripting
export rvm_project_rvmrc=1
test -e ${HOME}/.rvm/scripts/rvm && source ${HOME}/.rvm/scripts/rvm
# Check if dinghy is installed, and run shellinit if it exists
which dinghy 2>1 >/dev/null && eval $(dinghy shellinit)
which dinghy 2>&1 >/dev/null && eval $(dinghy shellinit)
# Setup NVM
export NVM_DIR=~/.nvm
test -e $(brew --prefix nvm)/nvm.sh && source $(brew --prefix nvm)/nvm.sh
function chpwd() {
# If there is an `.nvmrc` file then run `nvm use`
if [ -r $PWD/.nvmrc ]; then
nvm use
fi
}
# Setup iterm2 shell integration
test -e ${HOME}/.iterm2_shell_integration.zsh && source ${HOME}/.iterm2_shell_integration.zsh

Loading…
Cancel
Save