Skip to content

Instantly share code, notes, and snippets.

@pfheatwole
pfheatwole / pyenv-users
Last active April 12, 2023 14:55
pyenv plugin to scan for dependent virtual environments
#!/usr/bin/env bash
#
# Summary: Find virtual environments that use pyenv-managed versions.
#
# Usage: pyenv users [directory]
#
# Scans [directory] for virtual environments whose `python` commands
# are symlinks back into a pyenv version. Default: current directory.
#
# I'm not a script writer so it's probably a bit crude, but I find it