Use initialInput style for both.

Not sure if this is correct.
pull/9249/head
Jesse Miller 2025-10-18 15:05:25 -06:00
parent f6e29e027f
commit 245858dfc8
1 changed files with 4 additions and 18 deletions

View File

@ -11,15 +11,8 @@ class ScriptNewWindowCommand: NSScriptCommand {
if let command = evaluatedArguments?["command"] as? String {
config = Ghostty.SurfaceConfiguration()
let wait = evaluatedArguments?["wait"] as? Bool ?? false
if wait {
// Use command-based approach (forces waiting)
config?.command = command
config?.waitAfterCommand = true
} else {
// Use initialInput approach (no waiting)
config?.initialInput = "\(command); exit\n"
config?.waitAfterCommand = false
}
config?.initialInput = "\(command); exit\n"
config?.waitAfterCommand = wait
}
_ = TerminalController.newWindow(appDelegate.ghostty, withBaseConfig: config)
}
@ -36,15 +29,8 @@ class ScriptNewTabCommand: NSScriptCommand {
if let command = evaluatedArguments?["command"] as? String {
config = Ghostty.SurfaceConfiguration()
let wait = evaluatedArguments?["wait"] as? Bool ?? false
if wait {
// Use command-based approach (forces waiting)
config?.command = command
config?.waitAfterCommand = true
} else {
// Use initialInput approach (no waiting)
config?.initialInput = "\(command); exit\n"
config?.waitAfterCommand = false
}
config?.initialInput = "\(command); exit\n"
config?.waitAfterCommand = wait
}
_ = TerminalController.newTab(
appDelegate.ghostty,