diff --git a/lib/rvm.zsh b/lib/rvm.zsh index 597be1b33..5c354cd88 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -4,4 +4,10 @@ function rvm_prompt_info() { echo "($ruby_version)" } +if [[ -s $HOME/.rvm/scripts/rvm ]]; then + # Bugfix: prompt displays the current directory as "~rvm_rvmrc_cwd" + # http://beginrescueend.com/integration/zsh/ + unsetopt auto_name_dirs + source $HOME/.rvm/scripts/rvm +fi diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index e52553241..9c2e4da6a 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -33,4 +33,9 @@ plugins=(git) source $ZSH/oh-my-zsh.sh +# After open new tabs / windows and "Reuse Previous Tab's Directory" +# reload the .rvmrc file on current directory +# http://beginrescueend.com/integration/zsh/ +[[ -s $HOME/.rvm/scripts/rvm ]] && __rvm_project_rvmrc + # Customize to your needs...