Jovier Jimenez
d4c9655e26
Add prompt customization ( #476 )
tests / tests (macos-13) (push) Has been cancelled
tests / tests (macos-14) (push) Has been cancelled
tests / tests (ubuntu-20.04) (push) Has been cancelled
tests / tests (ubuntu-22.04) (push) Has been cancelled
2024-09-15 09:40:44 +03:00
Ivan Pozdeev
ac28398fc0
Don't activate if a 3rd-party virtualenv is active over ours
2024-04-03 21:09:22 +03:00
Romir K
0f83c33a3b
Add fish prompt changing ( #475 )
2024-02-12 12:58:27 +03:00
Josh French
fca12418ca
Add activate/deactivate hooks ( #452 )
2023-03-22 20:39:55 +03:00
native-api
77a7644ff7
Remove prompt deprecation warning ( #447 )
...
Prompt removal was never done and is not planned anymore
2023-01-31 23:14:52 +03:00
Alain Kalker
017ea60cd3
Fix another unbound variable error ( #424 )
...
* Fix tests failing after #423
2022-01-30 21:14:28 +03:00
Ville Skyttä
91609e25f3
perf(sh-activate): avoid a duplicate pyenv-version-name call ( #380 )
2021-11-14 02:30:56 +03:00
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
2018-11-21 22:00:56 -05:00
Teake Nutma
393bcc36b8
Source conda 4.4.4 shell files
...
Conda 4.4.4 (https://github.com/conda/conda/releases/tag/4.4.0 )
made some changes on how to set up conda in the shell.
This commit addresses these.
This fixes some of the discussion in #178 .
2018-03-08 10:08:53 +01:00
Christoph Paulik
f64c8ed0dd
Set CONDA_PREFIX to make is useable in conda activate/deactivate scripts.
2017-07-20 15:53:55 +02:00
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 .
2017-06-08 21:52:57 +02:00
Yamashita, Yuu
8c7dd01954
Replaced pyvenv by -m venv
2016-07-16 06:50:50 +00:00
Yamashita, Yuu
d6bc583753
Source conda package activate/deactivat scripts if exist ( fixes #173 )
2016-05-24 00:39:40 +00:00
Yamashita, Yuu
1cb6bb06ef
Turn PYENV_VIRTUALENV_VERBOSE_ACTIVATE on if --verbose is given
2016-05-07 13:45:00 +00:00
Yamashita, Yuu
08cfea259c
Remove backward compat --no-error option
2016-05-07 13:40:48 +00:00
Yamashita, Yuu
c64aebef08
1) Made --quiet as opposite of --verbose 2) Suppress warning about prompts on --quiet
2016-05-07 13:40:32 +00:00
puhitaku
f627609419
Suppress activate/deactivate messages by default
2016-04-08 15:45:26 +09:00
shangsunset
7938c89aff
change minor typo in bin/pyenv-sh-activate
2016-03-25 17:02:33 -04:00
Yamashita, Yuu
d3d6504e01
Set proper CONDA_DEFAULT_ENV for shorter name ( #160 )
2016-03-14 12:50:27 +00:00
Yamashita, Yuu
9414a6bb30
Stop showing version not installed in precmd ( #49 )
2015-12-18 02:32:01 +00:00
Yamashita, Yuu
17d22e7a13
Add PYENV_VIRTUAL_ENV to check if the virtualenv has been activated via pyenv-virtualenv or not ( #128 )
2015-12-05 01:44:10 +00:00
Yamashita, Yuu
e230817496
Restored --no-error for compatibility with v20151103 and earlier
2015-12-02 23:59:41 +00:00
Yamashita, Yuu
6e91d75069
Stop showing message about pyenv virtualenv-init on activate ( #122 )
...
`pyenv virtualenv-init` is just an option. Always showing message about
it would be too much to do.
2015-12-02 23:49:07 +00:00
Yamashita, Yuu
116e133c90
Activate a virtualenv of current version if specified version is not a virtualenv
...
```sh
% pyenv versions
system
* miniconda3-3.16.0 (set by PYENV_VERSION environment variable)
miniconda3-3.16.0/envs/venv
% pyenv activate venv
pyenv-virtualenv: deactivate miniconda3-3.16.0
pyenv-virtualenv: activate miniconda3-3.16.0/envs/venv
```
2015-11-27 00:04:05 +00:00
Yamashita, Yuu
aae07d1318
Deactivation before activation should not return as non-zero ( fixes #116 )
2015-11-26 09:15:02 +00:00
Yamashita, Yuu
0bbb12a3bf
Use glob to check if the virtualenv is inside pyenv's prefix or not
2015-11-24 00:04:18 +00:00
Yamashita, Yuu
4e9d697887
Suppress message about virtualenv-init if -quiet given ( fixes #122 )
2015-11-23 13:34:46 +00:00
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.
2015-11-23 13:33:31 +00:00
Yamashita, Yuu
caa5832b8a
Allow manual activation of virtualenvs inside $(pyenv-root)/versions ( #115 )
2015-11-16 02:29:46 +00:00
Yamashita, Yuu
47feedc934
exits as 0 if there is some virtualenv outside from pyenv is already activated ( #114 )
2015-11-12 13:29:25 +00:00
Yamashita, Yuu
a73817eecc
Use canonical name for VIRTUAL_ENV as a workaround for IPython ( fixes #113 )
2015-11-12 00:29:26 +00:00
Yamashita, Yuu
ee18ffac9f
Change prompt after activate ( #52 )
2015-11-09 01:57:17 +00:00
Yamashita, Yuu
950a742be3
Add short options
2015-11-08 09:18:29 +00:00
Yamashita, Yuu
bdd52a79cd
Revert PYENV_DEACTIVATE for backward compatibility
2015-11-08 08:34:43 +00:00
Yamashita, Yuu
f7d1aa7d94
Allow activating first version of virtualenv even if there are multiple versions in pyenv ( #105 )
2015-11-08 06:32:28 +00:00
Yamashita, Yuu
7f33ddd911
prompt should be managed by users, not by tools
2015-11-06 17:34:21 +00:00
Yamashita, Yuu
8731e9bf14
replaced --no-error by --quiet
2015-11-06 17:33:40 +00:00
Yamashita, Yuu
bf7e9ba59a
Show activating... messages by default
2015-11-06 17:27:50 +00:00
Yamashita, Yuu
c6a705b1d9
Setup CONDA_DEFAULT_ENV only if conda executable exists
2015-11-05 01:49:04 +00:00
Yamashita, Yuu
64ceee5c8e
Stop using virtualenv's activate script ( #69 )
2015-11-04 13:50:17 +00:00
Yamashita, Yuu
cdbf7c9972
activate "root" environment of anaconda/miniconda if environment name is not given
2015-07-19 04:19:34 +09:00
Yamashita, Yuu
25395f0331
activate: look for a conda environment if given name is not a pyenv's prefix
2015-07-19 03:38:48 +09:00
Yamashita, Yuu
be6701e7b6
Fix Error: too many arguments. on deactivating anaconda env
2015-07-19 01:04:23 +09:00
Yamashita, Yuu
65c74dbf2d
activate/deactivate anaconda/miniconda envs
2015-07-19 00:08:09 +09:00
Daniel Hahler
2571a2b973
activate: display setup instructions only with PYENV_VIRTUALENV_INIT=0
...
This fixes displaying the note, in case "init" has been run manually
and/or the init is not in the expected place.
It removes the unnecessary calls to "grep".
pyenv-virtualenv-init will look at `$PYENV_SHELL` now, too.
Tests have been adjusted/fixed.
2015-05-10 17:47:46 +02:00
Daniel Hahler
95fa7a35ad
shell: do not use basename, but bash
2015-05-10 17:36:03 +02:00
Yamashita Yuu
191e806ba9
shell version set in activate should be unset in deactivate ( #61 )
2014-12-23 11:21:52 +09:00
Yamashita Yuu
c9bcef656c
Use . instead of source to support POSIX sh
2014-08-13 10:54:18 +09:00
Yamashita Yuu
abfda4bac9
Fix issues with manual activation of virtual environments ( #34 )
2014-07-04 22:55:06 +09:00
Yamashita Yuu
d4ce853e94
Display information on automatic (de)?activation
2014-07-04 22:44:05 +09:00