aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-01-13 10:53:26 +0100
committerThomas Schmucker <ts@its1.de>2026-01-13 10:53:26 +0100
commitcce88d21d475cef3b0f8377c042ad62438d1674b (patch)
tree8a0bd6e1a2159f04f8543932d44aec7f3a784fc7 /zsh
parent719d9bdd3ad81f5e0ae381bae8c4b2b8b9b4da8e (diff)
downloaddotfiles-cce88d21d475cef3b0f8377c042ad62438d1674b.tar.gz
dotfiles-cce88d21d475cef3b0f8377c042ad62438d1674b.tar.bz2
dotfiles-cce88d21d475cef3b0f8377c042ad62438d1674b.zip
zsh: Hook für Python-Umgebungen hinzugefügt.
Diffstat (limited to 'zsh')
-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