forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rbenv.ts
87 lines (85 loc) · 1.96 KB
/
rbenv.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
const versionArg: Fig.Arg = {
name: "version",
isOptional: true,
};
const versionOptions: Fig.Option[] = [
{
name: "--unset",
},
];
export const completionSpec: Fig.Spec = {
name: "rbenv",
description:
"Pick a Ruby version for your application and guarantee that your development environment matches production",
subcommands: [
{
name: "commands",
description: "List all available rbenv commands",
options: [
{
name: ["--sh"],
},
{
name: ["--no-sh"],
},
],
},
{
name: "global",
description: "Set or show the global Ruby version",
args: versionArg,
options: versionOptions,
},
{
name: "install",
description: "Install a Ruby version using ruby-build",
options: [
{
name: ["--version"],
description: "Show version of ruby-build ",
args: versionArg,
},
],
},
{
name: "local",
description: "Set or show the local application-specific Ruby version",
args: versionArg,
options: versionOptions,
},
{
name: "rehash",
description: "Rehash rbenv shims (run this after installing executables)",
},
{
name: "shell",
description: "Set or show the shell-specific Ruby version",
args: versionArg,
},
{
name: "uninstall",
description: "Uninstall a specific Ruby version",
options: [
{
name: ["-f"],
description:
"If the version does not exist, do not display an error message. ",
args: {},
},
],
},
{
name: "versions",
description: "List installed Ruby versions",
},
{
name: "whence",
description: "List all Ruby versions that contain the given executable",
},
{
name: "which",
description: "Display the full path to an executable",
args: [{ name: "command" }],
},
],
};