macos: implement the quit command

This commit is contained in:
Mitchell Hashimoto
2026-03-07 07:28:56 -08:00
parent 210b01ad60
commit ed9a6cb648

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`: