-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathjava.ts
56 lines (56 loc) · 1.42 KB
/
java.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
import { filepaths } from "@fig/autocomplete-generators";
const completionSpec: Fig.Spec = {
name: "java",
description: "Launch a Java application",
parserDirectives: {
flagsArePosixNoncompliant: true,
},
args: {
name: "mainclass",
description: "To launch a class file",
generators: filepaths({ extensions: ["java", "class"] }),
},
options: [
{
name: "-jar",
priority: 99,
description: "To launch the main class in a JAR file",
args: {
name: "JAR file",
generators: filepaths({ extensions: ["jar"] }),
},
},
{
name: "-D",
priority: 98,
description: "Set a system property, -D<NAME>=<VALUE>",
},
{
name: ["--help", "-h", "-?"],
description: "Show help for java",
},
{
name: ["--version", "-version"],
description: "Print product version to the error stream and exit",
},
{
name: ["-showversion", "--show-version"],
description: "Print product version to the output stream and continue",
},
{
name: "--dry-run",
description:
"Create VM and load main class but do not execute main method",
},
// classpath
{
name: ["--classpath", "-cp"],
description: "Class search path of directories and zip/jar files",
args: {
name: "search files",
template: "filepaths",
},
},
],
};
export default completionSpec;