-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathmackup.ts
65 lines (63 loc) · 1.45 KB
/
mackup.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
const applicationGenerator: Fig.Generator = {
script: ["mackup", "list"],
postProcess: (output) => {
return output
.split("\n")
.filter((line) => line.includes("-"))
.map((name) => ({ name: name.substring(3) }));
},
};
const completionSpec: Fig.Spec = {
name: "mackup",
description: "Mackup",
options: [
{
name: ["--help", "-h"],
description: "Show help",
},
{
name: ["--force", "-f"],
description: "Force every question asked to be answered with 'Yes'",
},
{
name: ["--root", "-r"],
description: "Allow mackup to be run as superuser",
},
{
name: ["--dry-run", "-n"],
description: "Show steps without executing",
},
{
name: "--version",
description: "Show version",
},
],
subcommands: [
{
name: "list",
description: "List all the supported mackup applications",
},
{
name: "backup",
description: "Sync your conf files to your synced storage",
},
{
name: "restore",
description:
"Link the conf files already in your synced storage on your system",
},
{
name: "show",
description: "Show the current configuration",
args: {
name: "application",
generators: applicationGenerator,
},
},
{
name: "uninstall",
description: "Reset everything as it was before using Mackup",
},
],
};
export default completionSpec;