Sources/OrgApp/AppStoreCommands.swift
15 lines · 624 bytes
1import Foundation
2
3/// The commands the Mac App Store build leaves out of the palette and menus: exports that run
4/// Emacs, and attaching by link, which the sandbox doesn't allow.
5public enum AppStoreCommands {
6 public static let hidden: Set<String> = [
7 "app.export.pdf", "app.export.odt", "app.export.latex", "app.export.text",
8 "app.attach.link", "app.attach.symlink",
9 ]
10
11 /// What a key bound to a hidden command runs instead; nil when nothing takes its place.
12 public static func replacement(for id: String) -> String? {
13 id == "app.export.pdf" ? "app.export.print-pdf" : nil
14 }
15}