-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathibus.ts
72 lines (72 loc) · 1.57 KB
/
ibus.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
const completionSpec: Fig.Spec = {
name: "ibus",
subcommands: [
{
name: "engine",
description: "Set or get engine",
args: {
isOptional: true,
generators: {
script: ["ibus", "list-engine"],
postProcess: (out) =>
out
.split("\n")
.filter((line) => line.startsWith(" "))
.map((line) => {
const [id, name] = line.trim().split(" - ", 2);
return {
name: id,
description: name,
};
}),
},
},
},
{
name: "exit",
description: "Exit ibus-daemon",
},
{
name: "list-engine",
description: "Show available engines",
},
{
name: "watch",
description: "Not implemented",
hidden: true,
},
{
name: "version",
description: "Show version",
},
{
name: "read-cache",
description: "Show the content of registry cache",
},
{
name: "write-cache",
description: "Create registry cache",
},
{
name: "address",
description: "Print the D-Bus address of ibus-daemon",
},
{
name: "read-config",
description: "Show the configuration values",
},
{
name: "reset-config",
description: "Reset the configuration values",
},
{
name: "emoji",
description: "Save emoji on dialog to clipboard",
},
{
name: "help",
description: "Show this information",
},
],
};
export default completionSpec;