aboutsummaryrefslogtreecommitdiff
path: root/zsh/zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/zshrc')
-rw-r--r--zsh/zshrc17
1 files changed, 17 insertions, 0 deletions
diff --git a/zsh/zshrc b/zsh/zshrc
index 19b1cb7..d336bfc 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -1,5 +1,22 @@
1# vim: filetype=zsh 1# vim: filetype=zsh
2 2
3# Hooks
4function chpwd() {
5 if [[ -n "$VIRTUAL_ENV" ]]; then
6 local venv_dir="${VIRTUAL_ENV:h}"
7 if [[ "$PWD" != "$venv_dir"* ]]; then
8 deactivate
9 fi
10 fi
11
12 for v in .venv venv .env; do
13 if [[ -f "$v/bin/activate" ]]; then
14 source "$v/bin/activate"
15 break
16 fi
17 done
18}
19
3# Optionen 20# Optionen
4setopt AUTO_PARAM_SLASH 21setopt AUTO_PARAM_SLASH
5unsetopt CASE_GLOB 22unsetopt CASE_GLOB