Permalink
Browse files

ZSH auto_name_dirs feature is troublesome :)

  • Loading branch information...
1 parent c06f331 commit 9a3565aaced2fd9a9c4df8a90a6a8efca214b570 @wayneeseguin wayneeseguin committed Mar 2, 2011
Showing with 11 additions and 11 deletions.
  1. +11 −11 scripts/functions/rvmrc
View
@@ -212,16 +212,16 @@ read anykey
# argument is passed, it will be used instead of pwd.
__rvm_project_rvmrc()
{
- local cwd
+ local working_dir
# Get the first argument or the pwd.
- cwd="${1:-"$PWD"}"
+ working_dir="${1:-"$PWD"}"
while : ; do
- if [[ -z "$cwd" || "$HOME" = "$cwd" || "/" = "$cwd" ]] ; then
+ if [[ -z "$working_dir" || "$HOME" = "$working_dir" || "/" = "$working_dir" ]] ; then
- if [[ -n "${rvm_rvmrc_cwd:-""}" ]] ; then
+ if [[ -n "${rvm_current_rvmrc:-""}" ]] ; then
if [[ ${rvm_project_rvmrc_default:-0} -eq 1 ]]; then
@@ -233,29 +233,29 @@ __rvm_project_rvmrc()
fi
- unset rvm_rvmrc_cwd rvm_previous_environment
+ unset rvm_current_rvmrc rvm_previous_environment
fi
break
else
- if [[ -f "$cwd/.rvmrc" ]] ; then
+ if [[ -f "$working_dir/.rvmrc" ]] ; then
- if [[ "${rvm_rvmrc_cwd:-""}" != "$cwd" ]] ; then
+ if [[ "${rvm_current_rvmrc:-""}" != "$working_dir/.rvmrc" ]] ; then
- __rvm_check_rvmrc_trustworthiness "$cwd/.rvmrc"
+ __rvm_check_rvmrc_trustworthiness "$working_dir/.rvmrc"
local rvm_trustworthiness_result=$?
if [[ $rvm_trustworthiness_result -eq 0 ]]; then
rvm_previous_environment="$(__rvm_environment_identifier)"
- rvm_rvmrc_cwd="$cwd"
+ rvm_current_rvmrc="$working_dir/.rvmrc"
- source "$cwd/.rvmrc"
+ source "$working_dir/.rvmrc"
return 0
else
@@ -266,7 +266,7 @@ __rvm_project_rvmrc()
break
else
- cwd="$(dirname "$cwd")"
+ working_dir="$(dirname "$working_dir")"
fi
fi
done

0 comments on commit 9a3565a

Please sign in to comment.