Romir K
0f83c33a3b
Add fish prompt changing ( #475 )
7 months ago
Josh French
fca12418ca
Add activate/deactivate hooks ( #452 )
1 year ago
Alain Kalker
1ee7ca6346
Fix unbound variable errors when running `pyenv activate` with `set -u` ( #423 )
2 years ago
Luis Marsano
e0a1e9b35c
support newer conda
pyenv-virtualenvs could not list conda environments & pyenv shell would only activate the base conda environment
the conda detection criteria of testing the presence of `conda` or `activate` files under `$(pyenv root)/versions/$version/bin` appears to be the culprit, since newer environments no longer include these files: those files reside in the base conda environment
- add detection criteria of `$(pyenv root)/versions/$version/conda-meta`
- compute the real prefix to the base environment from `realpath $(realpath $(pyenv root)/versions/$version)/../..`
- to allow that, enhance substitute `realpath` in `pyenv-virtualenvs` to reduce relative paths `.` & `..`, and factor that code out to a file under `libexec` for reuse
- hook `which` to locate conda from the real prefix
5 years ago
Christoph Paulik
f64c8ed0dd
Set CONDA_PREFIX to make is useable in conda activate/deactivate scripts.
7 years ago
Drummond Ogilvie
862be21a32
fish: use "set -gx" instead of "setenv" ( #218 )
Use `set -gx` instead of `setenv` for fish shell.
Fix test "activate if the first virtualenv is a virtualenv": it was asserting
the output was of bash form, but not specifying that in the test — it now does.
Fixes https://github.com/pyenv/pyenv-virtualenv/issues/216 .
7 years ago
Yamashita, Yuu
8c7dd01954
Replaced `pyvenv` by `-m venv`
8 years ago
Yamashita, Yuu
d6bc583753
Source conda package activate/deactivat scripts if exist ( fixes #173 )
8 years ago
Yamashita, Yuu
1cb6bb06ef
Turn `PYENV_VIRTUALENV_VERBOSE_ACTIVATE` on if `--verbose` is given
8 years ago
Yamashita, Yuu
08cfea259c
Remove backward compat `--no-error` option
8 years ago
Yamashita, Yuu
c64aebef08
1) Made `--quiet` as opposite of `--verbose` 2) Suppress warning about prompts on `--quiet`
8 years ago
puhitaku
f627609419
Suppress activate/deactivate messages by default
8 years ago
Yamashita, Yuu
13b7dc172a
need to use `functions -q` to check existence of the function in fish ( #136 )
8 years ago
Yamashita, Yuu
17d22e7a13
Add `PYENV_VIRTUAL_ENV` to check if the virtualenv has been activated via pyenv-virtualenv or not ( #128 )
8 years ago
Yamashita, Yuu
aae3bf2786
Add workaround for rywyo/anyenv
8 years ago
Yamashita, Yuu
e230817496
Restored `--no-error` for compatibility with v20151103 and earlier
8 years ago
Yamashita, Yuu
5f87786adf
Remove `PYENV_DEACTIVATE` ( fixes #121 )
This means that pyenv-virtualenv will not allow manual deactivation of
virtualenv if pyenv-virtualenv-init is enabled. This must be acceptable
since the activation of virtualenv is just setting of environment
variables in current implementation.
8 years ago
Yamashita, Yuu
83bc6a49e4
Restore variables set by `activate` script of virtualenv properly ( #150 )
The `activate` script does't export the variables of `_OLD_VIRTUAL_*`,
most the deactivation code needed to be moved to `sh-deactivate`.
8 years ago
Yamashita, Yuu
ee18ffac9f
Change prompt after `activate` ( #52 )
9 years ago
Yamashita, Yuu
950a742be3
Add short options
9 years ago
Yamashita, Yuu
bdd52a79cd
Revert `PYENV_DEACTIVATE` for backward compatibility
9 years ago
Yamashita, Yuu
f7d1aa7d94
Allow activating first version of virtualenv even if there are multiple versions in pyenv ( #105 )
9 years ago
Yamashita, Yuu
0fa5de07c9
fix broken tests
9 years ago
Yamashita, Yuu
017d20ad91
remove unnecessary logic from init script
9 years ago
Yamashita, Yuu
7f33ddd911
prompt should be managed by users, not by tools
9 years ago
Yamashita, Yuu
8731e9bf14
replaced `--no-error` by `--quiet`
9 years ago
Yamashita, Yuu
bf7e9ba59a
Show `activating...` messages by default
9 years ago
Yamashita, Yuu
c6a705b1d9
Setup `CONDA_DEFAULT_ENV` only if `conda` executable exists
9 years ago
Yamashita, Yuu
64ceee5c8e
Stop using virtualenv's `activate` script ( #69 )
9 years ago
Yamashita, Yuu
cdbf7c9972
activate "root" environment of anaconda/miniconda if environment name is not given
9 years ago
Yamashita, Yuu
be6701e7b6
Fix `Error: too many arguments.` on deactivating anaconda env
9 years ago
Yamashita, Yuu
65c74dbf2d
activate/deactivate anaconda/miniconda envs
9 years ago
Yamashita Yuu
191e806ba9
shell version set in `activate` should be unset in `deactivate` ( #61 )
9 years ago
Yamashita Yuu
a3c86f013b
Deactivate virtualenv even if it has been activated manually
10 years ago
Yamashita Yuu
aef2546319
Fix broken fish's `if` statement
10 years ago
Yamashita Yuu
abfda4bac9
Fix issues with manual activation of virtual environments ( #34 )
10 years ago
Yamashita Yuu
d4ce853e94
Display information on automatic (de)?activation
10 years ago
Yamashita Yuu
58ed045796
s/QUIET/NOERROR/g
10 years ago
Yamashita Yuu
c2b5bbd19a
Fix fish syntax error at `else`
10 years ago
Yamashita Yuu
f0c400b669
Add `--quiet` option to `activate` and `deactivate`
10 years ago
Yamashita Yuu
5b3b909089
Exit as error on deactivation failures
10 years ago
Yamashita Yuu
0b5e0cf592
Unset shell version only if the `deactivate` has invoked
10 years ago
Yamashita Yuu
08b4c94f85
Use `PYENV_DEACTIVATE` to store which virtualenv has been deactivated ( #32 )
10 years ago
Yamashita Yuu
d9e3adc108
Performe as same as before v20140614 if `pyenv virtualenv-init` is not configured ( #26 )
10 years ago
Yamashita Yuu
8a837758dc
activate: invoke `pyenv shell` only if the arguments passed
10 years ago
Yamashita Yuu
26f2004abb
Add semicolon for the `deactivate` scripts for non-fish
10 years ago
Fotis Gimian
f7da0c5808
Repaired virtualenv activation and deactivation for the fish shell
10 years ago
Yamashita Yuu
f9d3984909
Hide output from `declare -f deactivate`
10 years ago
Yamashita Yuu
85959c735d
Add sh commands to activate/deactivate virtualenv into current shell
10 years ago