I don’t need to nest these statements
- ID
8368d26- date
2023-12-17 22:22:36+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
cc488dc- message
I don't need to nest these statements- changed files
1 file, 2 additions, 4 deletions
Changed files
fish_functions/auto_enable_venv.fish (1128) → fish_functions/auto_enable_venv.fish (1106)
diff --git a/fish_functions/auto_enable_venv.fish b/fish_functions/auto_enable_venv.fish
index 635aa13..8e6d9ff 100644
--- a/fish_functions/auto_enable_venv.fish
+++ b/fish_functions/auto_enable_venv.fish
@@ -12,10 +12,8 @@ function auto_enable_venv
# If we're already in a virtualenv, then we want to deactivate it
# (e.g. we've switched from a Git repo to another directory).
# Otherwise there's nothing to do.
- if [ "$REPO_ROOT" = "" ]
- if [ -n "$VIRTUAL_ENV" ]
- deactivate
- end
+ if test -z "$REPO_ROOT"; and test -n "$VIRTUAL_ENV"
+ deactivate
end
# If we're inside a Git repo, we look for the presence of .venv