From 23a398e39f57ffb7f2ff7892e00cce0a02a1c661 Mon Sep 17 00:00:00 2001 From: tinogomes Date: Sat, 28 Jan 2012 14:58:33 -0200 Subject: [PATCH] bugfix to display the current cirectory as `~rvm_rvmrc_cwd` and reload the .rvmrc file for solve bug when use zsh + rvm with iTerm2 --- lib/aliases.zsh | 7 +++++++ lib/rvm.zsh | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 16bba40d449a..2944cadf08ee 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -32,3 +32,10 @@ alias galias='alias | grep' #alias rm="rm -i" alias psg='show_processes' + +# If you are using oh-my-zsh and you see something like this error: +# pwd:4: too many arguments +# This is caused by an alias and due to the sh style sourcing of a +# script using the '.' operator instead of 'source'. +# So, uncomment below line. +# alias .='pwd' diff --git a/lib/rvm.zsh b/lib/rvm.zsh index e8744e61e373..4a4e42a2595c 100644 --- a/lib/rvm.zsh +++ b/lib/rvm.zsh @@ -6,3 +6,18 @@ function rvm_prompt_info() { [[ "${rvm_prompt}x" == "x" ]] && return echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}" } + +# Bugfix: prompt displays the current directory as "~rvm_rvmrc_cwd" +# http://beginrescueend.com/integration/zsh/ +if [[ -s $HOME/.rvm/scripts/rvm ]]; then + unsetopt auto_name_dirs + + source $HOME/.rvm/scripts/rvm +fi + +# If you are using oh-my-zsh and you see something like this error: +# pwd:4: too many arguments +# This is caused by an alias and due to the sh style sourcing of a +# script using the '.' operator instead of 'source'. +# So, go to .oh-my-zsh/lib/aliases.zsh file and uncomment the alias line: +# to "."