-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathrake.ts
105 lines (100 loc) · 2.49 KB
/
rake.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
const completionSpec: Fig.Spec = {
name: "rake",
description: "A ruby build program with capabilities similar to make",
icon: "https://avatars.githubusercontent.com/u/210414?s=48&v=4",
args: {
name: "targets",
isVariadic: true,
isOptional: true,
generators: {
script: ["rake", "--tasks", "--silent"],
cache: {
strategy: "stale-while-revalidate",
cacheByDirectory: true,
},
postProcess: function (out) {
return out.split("\n").map((line) => {
const [name, description] = line.split("#");
return {
name: name.trim().slice("rake ".length),
description: description.trim(),
};
});
},
},
},
options: [
{
name: ["-n", "--dry-run"],
description: "Do a dry run without executing actions",
},
{
name: ["-h", "-H", "--help"],
description: "Display this help message",
},
{
name: ["-I", "--libdir"],
requiresSeparator: true,
description: "Include LIBDIR in the search path for required modules",
args: {
name: "LIBDIR",
template: "folders",
},
},
{
name: ["-P", "--prereqs"],
description: "Display the tasks and dependencies, then exit",
},
{
name: ["-q", "--quiet"],
description: "Do not log messages to standard output",
},
{
name: ["-f", "--rakefile"],
requiresSeparator: true,
description: "Use FILE as the rakefile",
args: {
name: "FILE",
template: "filepaths",
},
},
{
name: ["-r", "--require"],
requiresSeparator: true,
description: "Require MODULE before executing rakefile",
args: {
name: "MODULE",
},
},
{
name: ["-s", "--silent"],
description:
"Like --quiet, but also suppresses the 'in directory' announcement",
},
{
name: ["-T", "--tasks"],
description: "Display the tasks and dependencies, then exit",
args: {
name: "pattern",
isOptional: true,
},
},
{
name: ["-t", "--trace"],
description: "Turn on invoke/execute tracing, enable full backtrace",
args: {
name: "output",
isOptional: true,
},
},
{
name: ["-v", "--verbose"],
description: "Log message to standard output (default)",
},
{
name: ["-V", "--version"],
description: "Display the program version",
},
],
};
export default completionSpec;