activate: invoke pyenv shell only if the arguments passed

This commit is contained in:
Yamashita Yuu
2014-06-02 20:16:14 +09:00
parent ea120da0c5
commit 8a837758dc
5 changed files with 11 additions and 26 deletions

View File

@@ -86,13 +86,7 @@ version.
Some external tools (e.g. [jedi](https://github.com/davidhalter/jedi)) might require you to `activate` the virtualenv.
`pyenv activate` lets you to activate the virtualenv into your shell.
$ pyenv activate venv27
`pyenv activate` acts almost like following commands.
The activate'd virtualenv will be persisted as _shell_ version.
$ pyenv shell venv27
$ source "$(pyenv prefix venv27)/bin/activate"
$ pyenv activate
### Deactivate virtualenv
@@ -105,13 +99,6 @@ This is prepared for similality between other `pyenv` commands like `shell` and
$ pyenv activate --unset
`pyenv deactivate` acts almost like following commands.
You can also use virtualenv's `deactivate` in place of `pyenv deactivate`,
but be careful with the _shell_ version because it will be persisted even if `deactivate` has invoked.
$ deactivate
$ pyenv shell --unset
### Special environment variables
You can set certain environment variables to control the pyenv-virtualenv.