-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathfold.ts
38 lines (38 loc) · 991 Bytes
/
fold.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
const completionSpec: Fig.Spec = {
name: "fold",
description: "Fold long lines for finite width output device",
parserDirectives: {
optionsMustPrecedeArguments: true,
},
options: [
{
name: "-b",
description: `Count width in bytes rather than column positions`,
},
{
name: "-s",
description: `Fold line after the last blank character within the first width
column positions (or bytes)`,
},
{
name: "-w",
description: `Specify a line width to use instead of the default 80 columns.
The width value should be a multiple of 8 if tabs are present,
or the tabs should be expanded using expand(1) before using
fold`,
args: {
name: "width",
suggestions: ["80", "90", "100", "110", "120"],
default: "80",
},
},
],
args: {
name: "file",
description: "File(s) to fold",
isOptional: true,
isVariadic: true,
template: "filepaths",
},
};
export default completionSpec;