aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshrc4
1 files changed, 2 insertions, 2 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 71b30ba..877ab70 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -2,9 +2,9 @@
2 2
3# Hooks 3# Hooks
4function chpwd() { 4function chpwd() {
5 if [[ -n "$VIRTUAL_ENV" ]]; then 5 if [[ -n "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then
6 local venv_dir="${VIRTUAL_ENV:h}" 6 local venv_dir="${VIRTUAL_ENV:h}"
7 if [[ "$PWD" != "$venv_dir"* ]]; then 7 if [[ "$PWD" != "$venv_dir"* ]] && (( $+functions[deactivate] )); then
8 deactivate 8 deactivate
9 fi 9 fi
10 fi 10 fi