-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathcut.ts
61 lines (60 loc) · 1.57 KB
/
cut.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
const completionSpec: Fig.Spec = {
name: "cut",
description: "Cut out selected portions of each line of a file",
args: {
template: "filepaths",
isOptional: true,
isVariadic: true,
},
options: [
{
name: "-b",
description: "Byte positions as a comma or - separated list of numbers",
args: {
name: "list",
description: "Specifies byte positions",
},
},
{
name: "-c",
description: "Column positions as a comma or - separated list of numbers",
args: {
name: "list",
description: "Specifies column positions",
},
},
{
name: "-f",
description: "Field positions as a comma or - separated list of numbers",
args: {
name: "list",
description: "Specifies column positions",
},
},
{
name: "-n",
description: "Do not split multi-byte characters",
},
{
name: "-d",
description:
"Use delim as the field delimiter character instead of the tab character",
args: {
name: "delim",
description: "Field deliminator to use instead of the tab character",
isOptional: true,
},
},
{
name: "-s",
description:
"Suppress lines with no field delimiter characters. unless specified, lines with no delimiters are passed through unmodified",
},
{
name: "-w",
description:
"Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator",
},
],
};
export default completionSpec;