Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect the .venv in any parent directory of the current directory #3918

Merged
merged 1 commit into from
Jun 15, 2015

Conversation

cbazin
Copy link

@cbazin cbazin commented May 21, 2015

This patch allow the autoactivation of virtualenv in any parent directory.

This is useful when the .venv directory is not at the root of the git repository.

In addition, it works even if the .venv is not in a git repository.

@jdutriaux
Copy link

👍

@Blist
Copy link

Blist commented May 21, 2015

useful feature when you work with many .venv in a project

@robbyrussell robbyrussell added the Area: plugin Issue or PR related to a plugin label Jun 15, 2015
robbyrussell added a commit that referenced this pull request Jun 15, 2015
Detect the .venv in any parent directory of the current directory
@robbyrussell robbyrussell merged commit 0a8ca6a into ohmyzsh:master Jun 15, 2015
SandyRogers added a commit to Saberr/oh-my-zsh that referenced this pull request Jun 15, 2015
…o plugin would not work

Issue was introduced by pull request ohmyzsh#3918.

This is a bit of a work-around for now (just checks if realpath is
installed…) but at least the plugin works again!

Better would be to install it, e.g.
https://github.com/harto/realpath-osx
@ParthKolekar
Copy link

Breaks a feature....
For some reason, mkvirtualenv makes the environments in $HOME/.virtualenvs/$PROJECT_NAME/
There is not .venv there.

OS: Ubuntu 14.04 LTS
virtualenv: 12.1.1
zsh: zsh 5.0.2 (x86_64-pc-linux-gnu)
oh-my-zsh: master

@jdutriaux
Copy link

See PR #4025.

@ncanceill
Copy link
Contributor

@cbazin please address this coment.

@jacobsvante
Copy link
Contributor

It's at times like these I wish that the project had a test suite.

@lilorox
Copy link

lilorox commented Jun 26, 2015

This completely breaks the plugin on Ubuntu. Besides the realpath executable issue, since I don't use .venv files in my projects, the script never detects my virtualenv.

@osleg
Copy link

osleg commented Jul 1, 2015

This patch breaking auto activation of venv without .venv by directory name

@apjanke
Copy link
Contributor

apjanke commented Jul 3, 2015

@osleg, @lilorox: PR #4122 makes git repos without .venv subdirs work again, and should fix your problems. Could you test that out and see if it works for you?

@apjanke
Copy link
Contributor

apjanke commented Jul 3, 2015

@ParthKolekar: mkvirtualenv is part of the main virtualenv distribution, not this oh-my-zsh plugin. Are you sure it was working before? Check the value of your $WORKON_HOME environment variable, which determines where your virtualenvs will be created by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet