diff --git a/bin/toolbox b/bin/toolbox index d8949fe..af6b482 100755 --- a/bin/toolbox +++ b/bin/toolbox @@ -669,6 +669,13 @@ def open_new_tab(command: str) -> None: """Öffnet den Befehl in einem neuen Tab im aktuellen Verzeichnis.""" full_cmd = f"cd {shlex.quote(CURRENT_DIR)} && {command}" + # WezTerm (macOS + Linux) + if shutil.which("wezterm") and os.environ.get("TERM_PROGRAM") == "WezTerm": + bash_cmd = f"{full_cmd}; exec bash" + subprocess.Popen(["wezterm", "cli", "spawn", "--cwd", CURRENT_DIR, + "--", "bash", "-c", bash_cmd]) + return + if IS_MAC: import tempfile escaped = full_cmd.replace("\\", "\\\\").replace('"', '\\"')