@@ -73,6 +73,12 @@ type TUIConfig struct {
7373 Theme string `json:"theme,omitempty"`
7474}
7575
76+// ShellConfig defines the configuration for the shell used by the bash tool.
77+type ShellConfig struct {
78+ Path string `json:"path,omitempty"`
79+ Args []string `json:"args,omitempty"`
80+}
81+
7682// Config is the main configuration structure for the application.
7783type Config struct {
7884 Data Data `json:"data"`
@@ -85,6 +91,7 @@ type Config struct {
8591 DebugLSP bool `json:"debugLSP,omitempty"`
8692 ContextPaths []string `json:"contextPaths,omitempty"`
8793 TUI TUIConfig `json:"tui"`
94+ Shell ShellConfig `json:"shell,omitempty"`
8895 AutoCompact bool `json:"autoCompact,omitempty"`
8996}
9097
@@ -217,6 +224,14 @@ func setDefaults(debug bool) {
217224 viper.SetDefault("tui.theme", "opencode")
218225 viper.SetDefault("autoCompact", true)
219226
227+ // Set default shell from environment or fallback to /bin/bash
228+ shellPath := os.Getenv("SHELL")
229+ if shellPath == "" {
230+ shellPath = "/bin/bash"
231+ }
232+ viper.SetDefault("shell.path", shellPath)
233+ viper.SetDefault("shell.args", []string{"-l"})
234+
220235 if debug {
221236 viper.SetDefault("debug", true)
222237 viper.Set("log.level", "debug")