-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathosascript.ts
63 lines (61 loc) · 1.39 KB
/
osascript.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { filepaths } from "@fig/autocomplete-generators";
const completionSpec: Fig.Spec = {
name: "osascript",
description: "Execute OSA scripts (AppleScript, JavaScript, etc.)",
options: [
{
name: "-e",
description: "Enter one line of a script",
args: {
name: "statement",
},
},
{
name: "-i",
description: "Interactive mode",
},
{
name: "-l",
description: "Override the language for any plain text files",
args: {
name: "language",
},
},
{
name: "-s",
description: "Modify the output style",
args: {
name: "flags",
isVariadic: true,
suggestions: [
{
name: "h",
description: "Print values in human-readable form (default)",
},
{
name: "s",
description: "Print values in recompilable source form",
},
{
name: "e",
description: "Print script errors to stderr (default)",
},
{
name: "o",
description: "Print script errors to stdout",
},
],
},
},
],
args: {
name: "script",
isScript: true,
isOptional: true,
generators: filepaths({
extensions: ["scpt", "scptd"],
editFileSuggestions: { priority: 76 },
}),
},
};
export default completionSpec;