This commit is contained in:
Jeff Putsch 2022-06-06 14:40:16 -07:00 committed by GitHub
commit ae04a2a279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -191,7 +191,9 @@ if [[ $autoenv_event == 'enter' ]]; then
setopt localoptions extendedglob
local -a venv
venv=(./(../)#.venv(NY1:A))
venv=(./(../)#.venv(N:A))
venv=( ${venv[1]} )
venv=( ${venv:#} )
if [[ -n "$_ZSH_ACTIVATED_VIRTUALENV" && -n "$VIRTUAL_ENV" ]]; then
if ! (( $#venv )) || [[ "$_ZSH_ACTIVATED_VIRTUALENV" != "$venv[1]" ]]; then

View File

@ -75,7 +75,8 @@ autoenv_prepend_path() {
}
autoenv_remove_path() {
local i
local old_path=$path
local old_path
old_path=$path
for i; do
path=("${(@)path:#$i}")
done