From 43a16d30f2498a0e48bf536f6f8f8be4713cba9e Mon Sep 17 00:00:00 2001 From: Branko May Trinkwald Date: Sun, 21 Dec 2025 19:51:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9A=20Fix:=20zsh=20Kompatibilit=C3=A4t?= =?UTF-8?q?=20f=C3=BCr=20crew=5Fdoctor=20&=20crew=5Fsyntax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: export -f funktioniert nicht in zsh, nur in bash → crew_doctor und crew_syntax wurden nicht geladen in zsh Lösung: - Prüfe BASH_VERSION - export -f nur in bash - In zsh sind Funktionen automatisch verfügbar Jetzt funktioniert waldwaechter.sh in beiden Shells: ✅ bash (export -f wird verwendet) ✅ zsh (Funktionen direkt verfügbar) macOS Standard ist zsh → kritischer Fix! 🤖 Generated with Claude Code Co-Authored-By: Claude Sonnet 4.5 --- lib/waldwaechter.sh | 53 +++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/lib/waldwaechter.sh b/lib/waldwaechter.sh index 95255f9..76a160c 100644 --- a/lib/waldwaechter.sh +++ b/lib/waldwaechter.sh @@ -463,29 +463,36 @@ EOF } # Export functions so they're available in subshells -export -f mayaeule -export -f deepbit -export -f bugsy -export -f schnippsi -export -f templatus -export -f tobi -export -f schraubaer -export -f schnecki -export -f dumbosql -export -f funkfox -export -f taichitaube -export -f snakepy -export -f pepperphp -export -f crabbyrust -export -f spider -export -f vektor -export -f asciimonster -export -f crew_tokens -export -f crew_status -export -f crew_memory -export -f crew_doctor -export -f crew_syntax -export -f crew_help +# Note: export -f works in bash, but not in zsh +# In zsh, functions are automatically available in the current shell +# For bash compatibility, we still do export -f, but it's optional in zsh +if [[ -n "$BASH_VERSION" ]]; then + # Bash: use export -f + export -f mayaeule + export -f deepbit + export -f bugsy + export -f schnippsi + export -f templatus + export -f tobi + export -f schraubaer + export -f schnecki + export -f dumbosql + export -f funkfox + export -f taichitaube + export -f snakepy + export -f pepperphp + export -f crabbyrust + export -f spider + export -f vektor + export -f asciimonster + export -f crew_tokens + export -f crew_status + export -f crew_memory + export -f crew_doctor + export -f crew_syntax + export -f crew_help +fi +# In zsh, functions are available without export -f # Set version marker for crew_doctor to detect reloads if [[ -f "${WALDWAECHTER_DIR}/lib/waldwaechter.sh" ]]; then