pyenv.pyenv-virtualenv/test
jakelodwick 8546b11429 Cache hook state to skip redundant pyenv sh-activate calls
Mtime-based caching: stat the directory tree once per prompt (~2ms)
and skip full activation when nothing has changed.

- Compare PYENV_VERSION, VIRTUAL_ENV, PWD; shortcut when PYENV_VERSION matches
- Walk PWD to / for .python-version (stop at first; include broken symlinks)
- Path list built once on miss, stored as array (spaces in paths)
- Global version file skipped when local version active
- version-name hooks checked at init; if present, caching disabled
- Covers bash, zsh, and fish
2026-03-24 21:39:30 -06:00
..
stubs stub: -unnecessary indirection 2025-12-18 03:47:16 +03:00
tmp Add .gitignore 2014-01-21 00:04:48 +09:00
activate.bats Add prompt customization (#476) 2024-09-15 09:40:44 +03:00
conda-activate.bats Add prompt customization (#476) 2024-09-15 09:40:44 +03:00
conda-deactivate.bats Add fish prompt changing (#475) 2024-02-12 12:58:27 +03:00
conda-prefix.bats Add test helpers for virtualenv, pyvenv and conda 2015-11-27 13:31:00 +00:00
conda.bats Fix a race condition between concurrently executing stubs 2025-12-18 03:47:17 +03:00
deactivate.bats Fix pyenv-virtualenv using a different Python version in a conda environment (#492) 2024-11-25 00:54:05 +03:00
delete.bats Install virtualenv 13.1.2 for CPython 3.2 (yyuu/pyenv#531) 2016-01-30 04:34:23 +00:00
envs.bats Fix failing to detect -m venv when "python" is not provided by the distro (#479) 2024-04-10 00:14:13 +03:00
hooks.bats Add prompt customization (#476) 2024-09-15 09:40:44 +03:00
init.bats Cache hook state to skip redundant pyenv sh-activate calls 2026-03-24 21:39:30 -06:00
installer.bats Add eval "$(pyenv virtualenv-init -)" to setup _precmd_ for user's shell 2014-06-04 15:24:12 +09:00
pip.bats Fix failing to detect -m venv when "python" is not provided by the distro (#479) 2024-04-10 00:14:13 +03:00
prefix.bats Replaced pyvenv by -m venv 2016-07-16 06:50:50 +00:00
python.bats Fix failing to detect -m venv when "python" is not provided by the distro (#479) 2024-04-10 00:14:13 +03:00
pyvenv.bats Fix failing to detect -m venv when "python" is not provided by the distro (#479) 2024-04-10 00:14:13 +03:00
test_helper.bash Cache hook state to skip redundant pyenv sh-activate calls 2026-03-24 21:39:30 -06:00
version.bats Fix failing to detect -m venv when "python" is not provided by the distro (#479) 2024-04-10 00:14:13 +03:00
virtualenv.bats Merge pull request #484 from native-api/pyenv_latest_f 2024-07-22 00:34:28 +03:00
virtualenvs.bats Treat all versions with activate script as a virtual environment 2015-11-04 13:07:46 +00:00