This commit is contained in:
marcus hinz
2026-07-12 00:35:09 +02:00
parent ce4e48e311
commit b1a2291aef
4 changed files with 20 additions and 11 deletions
+5 -3
View File
@@ -170,7 +170,8 @@ pub fn build_window(
/// Startet die PTY für das rufende Fenster: das konfigurierte Claude-Kommando
/// (settings.json: claudeCommand, Default claude) im Projektordner, mit dem
/// Pool-Verzeichnis als CLAUDE_CONFIG_DIR. zsh -i lädt die .zshrc (PATH, fnm).
/// Pool-Verzeichnis als CLAUDE_CONFIG_DIR. Die Login-Shell aus $SHELL (-l)
/// baut den PATH aus ihren Profil-Dateien auf — shell-agnostisch.
#[tauri::command]
pub fn term_start(
window: tauri::WebviewWindow,
@@ -195,8 +196,9 @@ pub fn term_start(
}
let _ = std::fs::write(&panel_path, "");
let mut cmd = CommandBuilder::new("/bin/zsh");
cmd.args(["-ic", &crate::claude_command(&paths)]);
let shell = std::env::var("SHELL").unwrap_or_else(|_| "/bin/sh".into());
let mut cmd = CommandBuilder::new(&shell);
cmd.args(["-lc", &crate::claude_command(&paths)]);
cmd.cwd(&cwd);
cmd.env("TERM", "xterm-256color");
cmd.env("AI_CONTROL_PANEL", &panel_path);