aboutsummaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2026-01-30 11:06:28 +0100
committerThomas Schmucker <ts@its1.de>2026-01-30 11:06:28 +0100
commit98d8a7c1ba6f3d2c546e25394f3045835975834a (patch)
treeb816b2b5d1e1ab49d248b2268d3ce713a328ef1f /zsh
parente1a2d77f447e31f9267e194d6f8ffea19a0c4c86 (diff)
downloaddotfiles-98d8a7c1ba6f3d2c546e25394f3045835975834a.tar.gz
dotfiles-98d8a7c1ba6f3d2c546e25394f3045835975834a.tar.bz2
dotfiles-98d8a7c1ba6f3d2c546e25394f3045835975834a.zip
zsh: Teste im cd-hook, ob wirklich eine Python-VEnv aktiv ist
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