Skip to content

Commit 7d72e22

Browse files
Add completion spec: sort (#260)
Co-authored-by: Oz <oz-agent@warp.dev>
1 parent 0bc963d commit 7d72e22

1 file changed

Lines changed: 247 additions & 0 deletions

File tree

command-signatures/json/sort.json

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
{
2+
"name": "sort",
3+
"description": "Sort lines of text files",
4+
"options": [
5+
{
6+
"name": [
7+
"-b",
8+
"--ignore-leading-blanks"
9+
],
10+
"description": "Ignore leading blanks"
11+
},
12+
{
13+
"name": [
14+
"-d",
15+
"--dictionary-order"
16+
],
17+
"description": "Consider only blanks and alphanumeric characters"
18+
},
19+
{
20+
"name": [
21+
"-f",
22+
"--ignore-case"
23+
],
24+
"description": "Fold lower case to upper case characters"
25+
},
26+
{
27+
"name": [
28+
"-g",
29+
"--general-numeric-sort"
30+
],
31+
"description": "Compare according to general numerical value"
32+
},
33+
{
34+
"name": [
35+
"-i",
36+
"--ignore-nonprinting"
37+
],
38+
"description": "Consider only printable characters"
39+
},
40+
{
41+
"name": [
42+
"-M",
43+
"--month-sort"
44+
],
45+
"description": "Compare (unknown) < 'JAN' < ... < 'DEC'"
46+
},
47+
{
48+
"name": [
49+
"-h",
50+
"--human-numeric-sort"
51+
],
52+
"description": "Compare human readable numbers (e.g., 2K 1G)"
53+
},
54+
{
55+
"name": [
56+
"-n",
57+
"--numeric-sort"
58+
],
59+
"description": "Compare according to string numerical value"
60+
},
61+
{
62+
"name": [
63+
"-R",
64+
"--random-sort"
65+
],
66+
"description": "Shuffle, but group identical keys"
67+
},
68+
{
69+
"name": "--random-source",
70+
"description": "Get random bytes from FILE",
71+
"args": {
72+
"name": "FILE",
73+
"template": "filepaths"
74+
}
75+
},
76+
{
77+
"name": [
78+
"-r",
79+
"--reverse"
80+
],
81+
"description": "Reverse the result of comparisons"
82+
},
83+
{
84+
"name": "--sort",
85+
"description": "Sort according to WORD",
86+
"args": {
87+
"name": "WORD",
88+
"suggestions": [
89+
"general-numeric",
90+
"human-numeric",
91+
"month",
92+
"numeric",
93+
"random",
94+
"version"
95+
]
96+
}
97+
},
98+
{
99+
"name": [
100+
"-V",
101+
"--version-sort"
102+
],
103+
"description": "Natural sort of (version) numbers within text"
104+
},
105+
{
106+
"name": "--batch-size",
107+
"description": "Merge at most NMERGE inputs at once; for more use temp files",
108+
"args": {
109+
"name": "NMERGE"
110+
}
111+
},
112+
{
113+
"name": [
114+
"-c",
115+
"--check"
116+
],
117+
"description": "Check for sorted input; do not sort"
118+
},
119+
{
120+
"name": "-C",
121+
"description": "Like -c, but do not report first bad line"
122+
},
123+
{
124+
"name": "--compress-program",
125+
"description": "Compress temporaries with PROG; decompress them with PROG -d",
126+
"args": {
127+
"name": "PROG"
128+
}
129+
},
130+
{
131+
"name": "--debug",
132+
"description": "Annotate the part of the line used to sort, and warn about questionable usage to stderr"
133+
},
134+
{
135+
"name": "--files0-from",
136+
"description": "Read input from the files specified by NUL-terminated names in file F; if F is - then read names from standard input",
137+
"args": {
138+
"name": "F",
139+
"template": "filepaths"
140+
}
141+
},
142+
{
143+
"name": [
144+
"-k",
145+
"--key"
146+
],
147+
"description": "Sort via a key; KEYDEF gives location and type (format: \"F[.C][OPTS][,F[.C][OPTS]]\")",
148+
"args": {
149+
"name": "KEYDEF"
150+
}
151+
},
152+
{
153+
"name": [
154+
"-m",
155+
"--merge"
156+
],
157+
"description": "Merge already sorted files; do not sort"
158+
},
159+
{
160+
"name": [
161+
"-o",
162+
"--output"
163+
],
164+
"description": "Write result to FILE instead of standard output",
165+
"args": {
166+
"name": "FILE",
167+
"template": "filepaths"
168+
}
169+
},
170+
{
171+
"name": [
172+
"-s",
173+
"--stable"
174+
],
175+
"description": "Stabilize sort by disabling last-resort comparison"
176+
},
177+
{
178+
"name": [
179+
"-S",
180+
"--buffer-size"
181+
],
182+
"description": "Use SIZE for main memory buffer",
183+
"args": {
184+
"name": "SIZE"
185+
}
186+
},
187+
{
188+
"name": [
189+
"-t",
190+
"--field-separator"
191+
],
192+
"description": "Use SEP instead of non-blank to blank transition",
193+
"args": {
194+
"name": "SEP"
195+
}
196+
},
197+
{
198+
"name": [
199+
"-T",
200+
"--temporary-directory"
201+
],
202+
"description": "Use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories",
203+
"args": {
204+
"name": "DIR",
205+
"template": "folders"
206+
}
207+
},
208+
{
209+
"name": "--parallel",
210+
"description": "Change the number of sorts run concurrently to N",
211+
"args": {
212+
"name": "N"
213+
}
214+
},
215+
{
216+
"name": [
217+
"-u",
218+
"--unique"
219+
],
220+
"description": "With -c, check for strict ordering; without -c, output only the first of an equal run"
221+
},
222+
{
223+
"name": [
224+
"-z",
225+
"--zero-terminated"
226+
],
227+
"description": "Line delimiter is NUL, not newline"
228+
},
229+
{
230+
"name": "--help",
231+
"description": "Display this help and exit"
232+
},
233+
{
234+
"name": "--version",
235+
"description": "Output version information and exit"
236+
}
237+
],
238+
"args": {
239+
"name": "FILE",
240+
"isOptional": true,
241+
"isVariadic": true,
242+
"template": [
243+
"filepaths",
244+
"folders"
245+
]
246+
}
247+
}

0 commit comments

Comments
 (0)