Sha256: 5eca6f4c804251dcfb1584a00b208ff8f4f96544afdc97612ff4d36c584c1df0

Contents?: true

Size: 657 Bytes

Versions: 24

Compression:

Stored size: 657 Bytes

Contents

#!/usr/bin/env bash

# Source a .rvmrc file in a directory after changing to it, if it exists.
# To disable this fature, set rvm_project_rvmrc=0 in $HOME/.rvmrc
if [[ "$rvm_project_rvmrc" != 0 ]] ; then
  cd() {
    builtin cd "$@"
    local cwd ; cwd=$(pwd)
    while : ; do
      if [[ -z "$cwd" ]] || [[ "$HOME" = "$cwd" ]] || [[ "/" = "$cwd" ]] ; then
        if [[ "$rvm_project_rvmrc_default" = 1 ]] ; then
          rvm default 1>/dev/null 2>&1
        fi
        break
      else
        if [[ -f "$cwd/.rvmrc" ]] ; then
          source "$cwd/.rvmrc"
          break
        else
          cwd=$(dirname "$cwd")
        fi
      fi
    done
  }
fi

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rvm-0.1.24 scripts/cd
rvm-0.1.23 scripts/cd
rvm-0.1.22 scripts/cd
rvm-0.1.21 scripts/cd
rvm-0.1.20 scripts/cd
rvm-0.1.19 scripts/cd
rvm-0.1.18 scripts/cd
rvm-0.1.16 scripts/cd
rvm-0.1.15 scripts/cd
rvm-0.1.14 scripts/cd
rvm-0.1.13 scripts/cd
rvm-0.1.12 scripts/cd
rvm-0.1.11 scripts/cd
rvm-0.1.10 scripts/cd
rvm-0.1.9 scripts/cd
rvm-0.1.8 scripts/cd
rvm-0.1.7 scripts/cd
rvm-0.1.6 scripts/cd
rvm-0.1.5 scripts/cd
rvm-0.1.3 scripts/cd