parent
f6e29e027f
commit
245858dfc8
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue