-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathshasum.ts
85 lines (84 loc) · 2.28 KB
/
shasum.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
const completionSpec: Fig.Spec = {
name: "shasum",
description: "Print or Check SHA Checksums",
args: {
name: "FILE",
description:
"Files to compute/check SHA checksums. With no FILE, or when FILE is -, read standard input",
template: "filepaths",
isOptional: true,
isVariadic: true,
},
options: [
{
name: ["-a", "--algorithm"],
description: "Select SHA algorithm",
args: {
suggestions: [
{ name: "1", description: "SHA-1 (default)" },
{ name: "224", description: "SHA-224" },
{ name: "256", description: "SHA-256" },
{ name: "384", description: "SHA-384" },
{ name: "512", description: "SHA-512" },
{ name: "512224", description: "SHA-512/224" },
{ name: "512256", description: "SHA-512/256" },
],
},
},
{
name: ["-b", "--binary"],
description: "Read in binary mode",
},
{
name: ["-c", "--check"],
description: "Read SHA sums from the FILEs and check them",
},
{
name: "--tag",
description: "Create a BSD-style checksum",
},
{
name: ["-t", "--text"],
description: "Read in text mode (default)",
},
{
name: ["-U", "--UNIVERSAL"],
description:
"Read in Universal Newlines mode - produces same digest on Windows/Unix/Mac",
},
{
name: ["-0", "--01"],
description:
"Read in BITS mode - ASCII '0' as 0-bit, ASCII '1' as 1-bit, others ignored",
},
{
name: "--ignore-missing",
description: "Don't fail or report status for missing files",
},
{
name: ["-q", "--quiet"],
description: "Don't print OK for each successfully verified file",
},
{
name: ["-s", "--status"],
description: "Don't output anything, status code shows success",
},
{
name: "--strict",
description: "Exit non-zero for improperly formatted checksum lines",
},
{
name: ["-w", "--warn"],
description: "Warn about improperly formatted checksum lines",
},
{
name: ["-h", "--help"],
description: "Display help and exit",
},
{
name: ["-v", "--version"],
description: "Output version information and exit",
},
],
};
export default completionSpec;