mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
14 lines
396 B
Fish
14 lines
396 B
Fish
function __auto_vent --on-variable PWD
|
|
if test -f "$PWD/.venv/bin/activate.fish"
|
|
source "$PWD/.venv/bin/activate.fish"
|
|
return
|
|
end
|
|
|
|
if set -q VIRTUAL_ENV
|
|
set -l project_dir (path dirname $VIRTUAL_ENV)
|
|
if not string match -q "$project_dir" "$PWD" and not string match -q "$project_dir/*" "$PWD"
|
|
deactivate 2>/dev/null
|
|
end
|
|
end
|
|
end
|