I would like to know if there is a way to get RVM to work with Bash's autocd option. Manual cd commands execute the .rvmrc, but autocd does not.

What currently happens:

# (in ~/src, with ruby 1.8.7)
$ cd ~/src/my_project                       # use 'cd' command
Using /home/user/.rvm/gems/ruby-1.9.2-p290  # runs .rvmrc
~/src/my_project [1.9.2-p290] $             # ruby version is changed.

# (in ~/src, with ruby 1.8.7)
$ ~/src/my_project                          # (use autocd to change directory)
cd /home/ndbroadbent/src/rails/clockit/     # (autocd kicks in)
~/src/my_project [1.8.7] $                  # .rvmrc is ignored.
link|improve this question
it's not yet possible, it could work with PROMPT_COMMAND ... check if it works tldp.org/HOWTO/Bash-Prompt-HOWTO/x264.html and create ticket here: github.com/wayneeseguin/rvm/issues so I can implement it – mpapis Feb 12 at 8:08
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.