forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
github.ts
71 lines (71 loc) · 1.68 KB
/
github.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
export const completionSpec: Fig.Spec = {
name: "github",
description: "Open a git repository in GitHub Desktop",
args: {
name: "path",
isOptional: true,
generators: { template: "folders" },
},
options: [
{
name: "--help",
description: "Show the help page for a command",
args: {
name: "command",
isOptional: true,
suggestions: ["clone", "open", "help"],
},
},
],
subcommands: [
{
name: "clone",
description: "Clone a repository",
insertValue: "clone ",
args: {
name: "url|slug",
suggestions: [
{
name: "https://github.com/",
icon: "https://github.com/fluidicon.png",
},
{
name: "https://gitlab.com/",
icon: "https://about.gitlab.com/ico/favicon-32x32.png",
},
{
name: "https://bitbucket.com/",
icon:
"https://wac-cdn.atlassian.com/assets/img/favicons/bitbucket/favicon-32x32.png",
},
],
},
options: [
{
name: ["--branch", "-b"],
description: "The branch to checkout after cloning",
args: { name: "branch" },
},
],
},
{
name: "open",
insertValue: "open ",
description: "Open a git repository in GitHub Desktop",
args: {
name: "path",
isOptional: true,
generators: { template: "folders" },
},
},
{
name: "help",
description: "Show the help page for a command",
args: {
name: "command",
isOptional: true,
suggestions: ["clone", "open", "help"],
},
},
],
};