Skip to content

Improve performance and output of pyenv virtualenvs #502

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Add --only-aliases argument
This is useful for listing the “frinedly” virtualenv names instead of
the short path which includes the Python version.
  • Loading branch information
samdoran committed Feb 13, 2025
commit 76a18ae3ed3e9ee9458e9352d4a637a2e7424e55
5 changes: 3 additions & 2 deletions bin/pyenv-virtualenvs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
#
# Summary: List all Python virtualenvs found in `$PYENV_ROOT/versions/*'.
# Usage: pyenv virtualenvs [--bare] [--skip-aliases]
# Usage: pyenv virtualenvs [--bare] [--skip-aliases] [--only-aliases]
#
# List all virtualenvs found in `$PYENV_ROOT/versions/*' and its `$PYENV_ROOT/versions/envs/*'.

Expand Down Expand Up @@ -34,10 +34,11 @@ for arg; do
case "$arg" in
--complete )
echo --bare
echo --skip-aliases
echo --only-aliases
exit ;;
--bare ) bare=1 ;;
--skip-aliases ) skip_aliases=1 ;;
--only-aliases ) only_aliases=1 ;;
* )
pyenv-help --usage virtualenvs >&2
exit 1
Expand Down