mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
core: only disable forced shell integration
This allows automatic shell detection (the default) to also apply to 'initial-command', which is consistent with how it applies to 'command'.
This commit is contained in:
@ -509,12 +509,16 @@ pub fn init(
|
||||
|
||||
// The command we're going to execute is either 'initial-command'
|
||||
// (from -e or explicit configuration) or 'command' (our shell or
|
||||
// explicit configuration). Shell integration is disabled when
|
||||
// we're using 'initial-command'.
|
||||
// explicit configuration). Forced shell integration is disabled
|
||||
// when we're using 'initial-command'.
|
||||
const command: ?[]const u8, const shell_integration: configpkg.Config.ShellIntegration = config: {
|
||||
if (app.first) {
|
||||
if (config.@"initial-command") |initial_command| {
|
||||
break :config .{ initial_command, .none };
|
||||
const shell_integration: configpkg.Config.ShellIntegration = switch (config.@"shell-integration") {
|
||||
.detect => .detect,
|
||||
else => .none,
|
||||
};
|
||||
break :config .{ initial_command, shell_integration };
|
||||
}
|
||||
}
|
||||
break :config .{ config.command, config.@"shell-integration" };
|
||||
|
Reference in New Issue
Block a user