macOS: fix command parsing in NewTerminalIntent

Fixes #12391, regression from #10765

Signed-off-by: Lukas <134181853+bo2themax@users.noreply.github.com>
This commit is contained in:
Lukas
2026-04-23 11:28:31 +02:00
parent e88c6c0991
commit a8ed37a791

View File

@@ -67,8 +67,8 @@ struct NewTerminalIntent: AppIntent {
// We don't run command as "command" and instead use "initialInput" so
// that we can get all the login scripts to setup things like PATH.
if let command {
config.initialInput = "\(Ghostty.Shell.quote(command)); exit\n"
if let command, !command.isEmpty {
config.initialInput = "\(command); exit\n"
}
// If we were given a working directory then open that directory