pythonbrew icon indicating copy to clipboard operation
pythonbrew copied to clipboard

rvmrc-like auto-switching venv

Open iwinux opened this issue 12 years ago • 10 comments

Will there be support for venv auto-switching (just like what RVM does) ?

In RVM it works like this: if there is .rvmrc inside current directory, RVM will switch Ruby environment based on the content of the .rvmrc.

iwinux avatar Nov 04 '11 16:11 iwinux

I'd love the same thing. Heck, if I wasn't under the pump right now at work I'd offer to code it up.

ps. Loving pythonbrew so far!

cloudartisan avatar Nov 09 '11 03:11 cloudartisan

I'm gonna take a look at RVM's code some time. Hope that I can learn the idea from RVM and implement it for pythonbrew.

iwinux avatar Nov 09 '11 10:11 iwinux

they hijack cd

cd () 
{ 
    builtin cd "$@";
    local result=$?;
    __rvm_project_rvmrc;
    __rvm_after_cd;
    return $result
}

bkad avatar Nov 09 '11 22:11 bkad

Personally, I'd rather not have this. I've never liked the fact that RVM hijacks cd and I'm not sure there is any other way to do it.

seanfisk avatar Nov 21 '11 11:11 seanfisk

just ran into pythonbrew, I'd love to have the rvmrc like feature as well. because one has to explicitly create the file for auto venv switching, it shouldn't be a problem to the ones who chose not to use it.

suvash avatar Dec 13 '11 03:12 suvash

+1

akhil avatar Feb 09 '12 09:02 akhil

This can work too: https://github.com/cxreg/smartcd

ypandit avatar Feb 24 '12 22:02 ypandit

+1

andrewcrook avatar Sep 13 '12 17:09 andrewcrook

+1 would love this too :)

fgimian avatar Dec 02 '12 08:12 fgimian

+1

jukeks avatar May 08 '13 12:05 jukeks