Skip to content

Commit 7e821de

Browse files
committed
Support creating shims of virtual environments in envs (#103)
1 parent 0df362e commit 7e821de

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

etc/pyenv.d/rehash/envs.bash

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
virtualenv_list_executable_names() {
2+
local file
3+
shopt -s nullglob
4+
for file in "$PYENV_ROOT"/versions/*/envs/*/bin/*; do
5+
echo "${file##*/}"
6+
done
7+
shopt -u nullglob
8+
}
9+
if declare -f make_shims 1>/dev/null 2>&1; then
10+
make_shims $(virtualenv_list_executable_names | sort -u)
11+
fi

0 commit comments

Comments
 (0)