-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathsubl.ts
75 lines (71 loc) · 1.72 KB
/
subl.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
64
65
66
67
68
69
70
71
72
73
74
75
import { filepaths } from "@fig/autocomplete-generators";
const generateProjects: Fig.Generator = filepaths({
equals: [".sublime-project", ".sublime-workspace"],
editFileSuggestions: { priority: 76 },
});
const completionSpec: Fig.Spec = {
name: "subl",
description: "Sublime Text",
args: {
name: "files|directories",
isVariadic: true,
isOptional: true,
template: ["folders", "filepaths"],
},
options: [
{
name: "--project",
description: "Load the given project",
args: {
name: "project",
generators: generateProjects,
},
},
{
name: "--command",
description: "Run the given command",
args: {
name: "command",
},
},
{
name: ["-n", "--new-window"],
description: "Open a new window",
exclusiveOn: ["-a"],
},
{
name: ["-a", "--add"],
description: "Add folders to the current window",
exclusiveOn: ["-n"],
},
{
name: "--launch-or-new-window",
description: "Only open a new window if the application is open",
},
{
name: ["-w", "--wait"],
description: "Wait for the files to be closed before returning",
},
{
name: ["-b", "--background"],
description: "Don't activate the application",
},
{
name: ["-s", "--stay"],
description: "Keep the application activated after closing the file",
},
{
name: "--safe-mode",
description: "Launch using a clean environment",
},
{
name: ["-h", "--help"],
description: "Show a help message and exit",
},
{
name: ["-v", "--version"],
description: "Show the version and exit",
},
],
};
export default completionSpec;