-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathseq.ts
56 lines (56 loc) · 1.37 KB
/
seq.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
const completionSpec: Fig.Spec = {
name: "seq",
description: "Print sequences of numbers. (Defaults to increments of 1)",
args: [
{
name: "first",
description: "Starting number in sequence",
},
{
name: "step",
description: "Increment interval",
isOptional: true,
},
{
name: "last",
description: "Last number in sequence",
isOptional: true,
},
],
options: [
{
name: ["-w", "--fixed-width"],
description:
"Equalize the widths of all numbers by padding with zeros as necessary",
},
{
name: ["-s", "--separator"],
description: "String separator between numbers. Default is newline",
insertValue: `-s "{cursor}"`,
args: {
name: "string",
description: "Separator",
},
},
{
name: ["-f", "--format"],
description: "Use a printf(3) style format to print each number",
insertValue: `-f %{cursor}`,
args: {
name: "format",
description: "Print all numbers using format",
},
},
{
// TODO(platform): macos only option
name: ["-t", "--terminator"],
description: "Use string to terminate sequence of numbers",
insertValue: `-t "{cursor}"`,
args: {
name: "string",
description: "Terminator",
},
},
],
};
export default completionSpec;