From f3cab47b76ab8f12c1b15e9e269b7d02b6879f1c Mon Sep 17 00:00:00 2001 From: Charles Duffy Date: Tue, 6 Jan 2026 09:32:29 -0600 Subject: [PATCH] Honor user's configured default shell instead of hardcoding zsh (#151) --- src/main/index.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index 587aa4ed..ea584cc3 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -174,7 +174,23 @@ const store = new Store({ fontFamily: 'Roboto Mono, Menlo, "Courier New", monospace', customFonts: [], logLevel: 'info', - defaultShell: 'zsh', + defaultShell: (() => { + // Windows: $SHELL doesn't exist; default to PowerShell + if (process.platform === 'win32') { + return 'powershell'; + } + // Unix: Respect user's configured login shell from $SHELL + const shellPath = process.env.SHELL; + if (shellPath) { + const shellName = path.basename(shellPath); + // Valid Unix shell IDs from shellDetector.ts (lines 27-34) + if (['bash', 'zsh', 'fish', 'sh', 'tcsh'].includes(shellName)) { + return shellName; + } + } + // Fallback to bash (more portable than zsh on older Unix systems) + return 'bash'; + })(), webAuthEnabled: false, webAuthToken: null, webInterfaceUseCustomPort: false,