mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
macos: implement the quit command
This commit is contained in:
@@ -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`:
|
||||
|
||||
Reference in New Issue
Block a user