1
0
Fork 0

fix autopyenv regex

This commit is contained in:
Luca Bilke 2022-08-03 11:22:38 +02:00
parent e81369a984
commit 0c75931936
No known key found for this signature in database
GPG Key ID: 7B77C51E8C779E75
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
PYENV_DIR="${PYENVS_HOME:-${XDG_DATA_HOME:-$HOME/.local/share}/pyenvs}"
function chpwd_activate(){
for pydir in $(ls $PYENV_DIR); do
if [[ $(pwd|sed -e s@/@_@g) =~ "^$pydir" ]]; then
if [[ $(pwd|sed -e s@/@_@g) =~ "^$pydir$" ]]; then
if [ "x$VIRTUAL_ENV" != "x$PYENV_DIR/$pydir" ]; then
# echo "Activating virtual env $pydir"
source "$PYENV_DIR/$pydir/bin/activate"