Commit Graph

18 Commits

Author SHA1 Message Date
Robby Russell
0a8ca6adff Merge pull request #3918 from cbazin/master
Detect the .venv in any parent directory of the current directory
2015-06-14 22:19:23 -07:00
Tommy Wang
d0b690b584 use local options to set no_equals before sourcing bash completion script 2015-06-13 10:57:31 +02:00
epelletier
7b478d75a3 Detect the .venv in any parent directory of the current directory 2015-05-21 17:34:24 +02:00
Marc Cornellà
732c7b8070 Simplify adding workon_cwd to chpwd hook 2015-02-10 20:32:52 +01:00
Marc Cornellà
b62911660d Organize error checking in virtualenwrapper plugin 2015-02-10 20:32:52 +01:00
Brandon Sandrowicz
4161aa4f9d Fixing virtualenvwrapper plugin for Ubuntu (and Debian)
Ubuntu and Debian store the system-installed virtualenvwrapper in
/etc/bash_completion.d/virtualenvwrapper, so that it gets automatically sourced
at startup in Bash. By not putting it somewhere in $PATH, they end up excluding
others (e.g. Zsh) that might want to use that file. Oops!

The virtualenvwrapper plugin should account for this so that Ubuntu (or Debian)
users don't end up with this message:

zsh virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh. Please install with `pip install virtualenvwrapper`.

even when they have a virtualenvwrapper installed to a known location.
2015-02-10 20:32:52 +01:00
Jyrki Pulliainen
833e6f5958 virtualenvwrapper: Deactivate only if in virtualenv
If user manually deactivates the virtualenv when using this mode, zsh
will produce following error:

    deactivate:12: command not found: virtualenv_deactivate

To avoid this, check that the VIRTUAL_ENV flag is set before trying to
automatically deactivate the virtual environment.

Fixes #2185
2015-01-07 18:17:29 +01:00
benjaoming
4b05e548d0 Throw an error message when $WORKON_HOME is not set
Took me a while to figure this one out, and I have a default installation of virtualenvwrapper -- this is a soft fix, just put an error message. But perhaps the fix should be to use the default value `~/.virtualenvs`.
2014-11-28 14:41:34 +01:00
Felix Laurie von Massenbach
3be2e34d96 Don't lazy load the virtualenvwrapper.
Fix robbyrussell#2355.
2014-03-17 02:17:30 +00:00
Lei Zhang
c0c9fc0254 Add support .venv folder as virtual env 2013-10-16 15:50:52 +08:00
Andrew Grangaard
e73dd2cdf8 virtualenvwrapper plugin cleanup
* removes cd override by using chpwd_functions
* removes subshell call to which by using $+commands array and
  c param expansion to find in PATH
* zsh love!
2013-06-08 11:36:14 -07:00
Germán M. Bravo
69116fa806 Fixed recursion. Git not needed for it to work.
Avoid infinite `cd` loops under certain conditions. Try getting `.venv` from the current directory (not necessarily always using git)
2013-05-21 14:20:28 -04:00
J. Randall Hunt
b9d5a39098 use lazy load for virtualenvwrapper
Using lazy loading for virtualenvwrapper gives a mariginal speed
improvement and doesn't stop workon_cd from working. It has the
undesired effect of forcing you to call certain virtualenv commands
twice before they work (only once per shell instantiation).
2012-12-02 16:40:40 -05:00
Cenk Alti
d5e5b7ee5a search virtualenvwrapper.sh in PATH 2012-08-25 10:27:05 +03:00
Cenk Alti
6f92745761 Added another path for virtualenvwrapper plugin
When you install python via brew on OSX, pip is installed into /usr/local/share/python/ and all packages installed with this pip are installed here.
2012-08-25 09:51:58 +03:00
David Barragan
d15ec4bf24 Added another path 2012-06-25 10:55:23 +02:00
James Walker
82f785bc67 remove readlink call and clean up 2012-06-18 10:41:19 -04:00
Jaiden Mispy
61ceec5285 Plugin which loads Python virtualenvwrapper and activates virtualenvs on cd into git repos 2012-06-09 11:04:58 +10:00