forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhyper.ts
76 lines (75 loc) · 1.63 KB
/
hyper.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
const completionSpec: Fig.Spec = {
name: "hyper",
description: "Hyper is an Electron-based terminal",
args: {
template: "folders",
},
subcommands: [
{
name: ["install", "i"],
description: "Install a plugin",
args: {
name: "plugin",
},
},
{
name: ["docs", "d", "h", "home"],
description: "Open the npm page of a plugin",
args: {
name: "plugin",
},
},
{
name: "help",
description: "Display help",
},
{
name: ["list", "ls"],
description: "List installed plugins",
},
{
name: ["list-remote", "lsr", " ls-remote"],
description: "List plugins available on npm",
},
{
name: ["search", "s"],
description: "Search for plugins on npm",
args: {
isOptional: true,
name: "query",
description: "Your search query",
},
},
{
name: ["uninstall", "u", "rm", "remove"],
description: "Uninstall plugin",
args: {
name: "plugin",
description: "Plugin to uninstall",
generators: {
script: "hyper list",
postProcess: function (out) {
return out.split("\n").map((p) => {
return { name: p, description: "Plugin name" };
});
},
},
},
},
{
name: "version",
description: "Show version",
},
],
options: [
{
name: ["-h", "--help"],
description: `Output usage information`,
},
{
name: ["-v", "--verbose"],
description: `Verbose mode (disabled by default)`,
},
],
};
export default completionSpec;