macos: implement the quit command

pull/11208/head
Mitchell Hashimoto 2026-03-07 07:28:56 -08:00
parent 210b01ad60
commit ed9a6cb648
No known key found for this signature in database
GPG Key ID: 523D5DC389D273BC
1 changed files with 10 additions and 0 deletions

View File

@ -196,6 +196,16 @@ extension NSApplication {
return ScriptWindow(primaryController: controller)
}
/// Handler for the `quit` AppleScript command.
///
/// Required selector name from the command in `sdef`:
/// `handleQuitScriptCommand:`.
@objc(handleQuitScriptCommand:)
func handleQuitScriptCommand(_ command: NSScriptCommand) {
guard validateScript(command: command) else { return }
terminate(nil)
}
/// Handler for the `new tab` AppleScript command.
///
/// Required selector name from the command in `sdef`: