File: option_parse.go

package info (click to toggle)
miller 6.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 87,928 kB
  • sloc: ruby: 162; sh: 119; makefile: 87
file content (3379 lines) | stat: -rw-r--r-- 118,302 bytes parent folder | download
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
// ================================================================
// Items which might better belong in miller/cli, but which are placed in a
// deeper package to avoid a package-dependency cycle between miller/cli and
// miller/transforming.
// ================================================================

package cli

import (
	"bufio"
	"errors"
	"fmt"
	"io"
	"os"
	"strings"

	"github.com/mattn/go-isatty"

	"github.com/johnkerl/miller/v6/pkg/colorizer"
	"github.com/johnkerl/miller/v6/pkg/lib"
	"github.com/johnkerl/miller/v6/pkg/mlrval"
)

// FinalizeReaderOptions does a few things.
//   - If a file format was specified but one or more separators were not, a
//     default specific to that file format is applied.
//   - Computing regexes for IPS and IFS, and unbackslashing IRS.  This is
//     because the '\n' at the command line which is Go "\\n" (a backslash and an
//     n) needs to become the single newline character, and likewise for "\t", etc.
//   - IFS/IPS can have escapes like "\x1f" which aren't valid regex literals
//     so we unhex them. For example, from "\x1f" -- the four bytes '\', 'x', '1', 'f'
//     -- to the single byte with hex code 0x1f.
func FinalizeReaderOptions(readerOptions *TReaderOptions) error {

	readerOptions.IFS = lib.UnhexStringLiteral(readerOptions.IFS)
	readerOptions.IPS = lib.UnhexStringLiteral(readerOptions.IPS)

	if !readerOptions.ifsWasSpecified {
		readerOptions.IFS = defaultFSes[readerOptions.InputFileFormat]
	}
	if !readerOptions.ipsWasSpecified {
		readerOptions.IPS = defaultPSes[readerOptions.InputFileFormat]
	}
	if !readerOptions.irsWasSpecified {
		readerOptions.IRS = defaultRSes[readerOptions.InputFileFormat]
	}
	if !readerOptions.allowRepeatIFSWasSpecified {
		// Special case for Miller 6 upgrade -- now that we have regexing for mixes of tabs
		// and spaces, that should now be the default for NIDX. But *only* for NIDX format,
		// and if IFS wasn't specified.
		if readerOptions.InputFileFormat == "nidx" && !readerOptions.ifsWasSpecified {
			readerOptions.IFSRegex = lib.CompileMillerRegexOrDie(WHITESPACE_REGEX)
		} else {
			readerOptions.AllowRepeatIFS = defaultAllowRepeatIFSes[readerOptions.InputFileFormat]
		}
	}

	readerOptions.IFS = lib.UnbackslashStringLiteral(readerOptions.IFS)
	readerOptions.IPS = lib.UnbackslashStringLiteral(readerOptions.IPS)
	readerOptions.IRS = lib.UnbackslashStringLiteral(readerOptions.IRS)

	if readerOptions.IRS == "" {
		return errors.New("empty IRS")
	}
	return nil
}

// FinalizeWriterOptions unbackslashes OPS, OFS, and ORS.  This is because
// because the '\n' at the command line which is Go "\\n" (a backslash and an
// n) needs to become the single newline character., and likewise for "\t", etc.
func FinalizeWriterOptions(writerOptions *TWriterOptions) error {
	if !writerOptions.ofsWasSpecified {
		writerOptions.OFS = defaultFSes[writerOptions.OutputFileFormat]
	}
	if !writerOptions.opsWasSpecified {
		writerOptions.OPS = defaultPSes[writerOptions.OutputFileFormat]
	}
	if !writerOptions.orsWasSpecified {
		writerOptions.ORS = defaultRSes[writerOptions.OutputFileFormat]
	}

	// If output is a terminal, fflush on every record. Otherwise, use default
	// buffering (flush every some number of KB or on EOF). This is a
	// significant performance improvement for large files, as we invoke
	// syscall.write (with its invocation overhead) far less frequently.
	if !writerOptions.flushOnEveryRecordWasSpecified {
		writerOptions.FlushOnEveryRecord = isatty.IsTerminal(os.Stdout.Fd())
	}

	writerOptions.OFS = lib.UnbackslashStringLiteral(writerOptions.OFS)
	writerOptions.OPS = lib.UnbackslashStringLiteral(writerOptions.OPS)
	writerOptions.ORS = lib.UnbackslashStringLiteral(writerOptions.ORS)

	return nil
}

// ================================================================
var FLAG_TABLE = FlagTable{
	sections: []*FlagSection{
		&LegacyFlagSection,
		&SeparatorFlagSection,
		&FileFormatFlagSection,
		&FormatConversionKeystrokeSaverFlagSection,
		&CSVTSVOnlyFlagSection,
		&JSONOnlyFlagSection,
		&PPRINTOnlyFlagSection,
		&DKVPOnlyFlagSection,
		&CompressedDataFlagSection,
		&CommentsInDataFlagSection,
		&OutputColorizationFlagSection,
		&FlattenUnflattenFlagSection,
		&ProfilingFlagSection,
		&MiscFlagSection,
	},
}

func init() {
	FLAG_TABLE.Sort()
}

// ================================================================
// SEPARATOR FLAGS

func SeparatorPrintInfo() {
	fmt.Println(`See the Separators doc page for more about record separators, field
separators, and pair separators. Also see the File formats doc page, or
` + "`mlr help file-formats`" + `, for more about the file formats Miller supports.

In brief:

* For DKVP records like ` + "`x=1,y=2,z=3`" + `, the fields are separated by a comma,
  the key-value pairs are separated by a comma, and each record is separated
  from the next by a newline.
* Each file format has its own default separators.
* Most formats, such as CSV, don't support pair-separators: keys are on the CSV
  header line and values are on each CSV data line; keys and values are not
  placed next to one another.
* Some separators are not programmable: for example JSON uses a colon as a
  pair separator but this is non-modifiable in the JSON spec.
* You can set separators differently between Miller's input and output --
  hence ` + "`--ifs`" + ` and ` + "`--ofs`" + `, etc.

Notes about line endings:

* Default line endings (` + "`--irs`" + ` and ` + "`--ors`" + `) are newline
  which is interpreted to accept carriage-return/newline files (e.g. on Windows)
  for input, and to produce platform-appropriate line endings on output.

Notes about all other separators:

* IPS/OPS are only used for DKVP and XTAB formats, since only in these formats
  do key-value pairs appear juxtaposed.
* IRS/ORS are ignored for XTAB format. Nominally IFS and OFS are newlines;
  XTAB records are separated by two or more consecutive IFS/OFS -- i.e.
  a blank line. Everything above about ` + "`--irs/--ors/--rs auto`" + ` becomes ` + "`--ifs/--ofs/--fs`" + `
  auto for XTAB format. (XTAB's default IFS/OFS are "auto".)
* OFS must be single-character for PPRINT format. This is because it is used
  with repetition for alignment; multi-character separators would make
  alignment impossible.
* OPS may be multi-character for XTAB format, in which case alignment is
  disabled.
* FS/PS are ignored for markdown format; RS is used.
* All FS and PS options are ignored for JSON format, since they are not relevant
  to the JSON format.
* You can specify separators in any of the following ways, shown by example:
  - Type them out, quoting as necessary for shell escapes, e.g.
    ` + "`--fs '|' --ips :`" + `
  - C-style escape sequences, e.g. ` + "`--rs '\\r\\n' --fs '\\t'`" + `.
  - To avoid backslashing, you can use any of the following names:`)
	fmt.Println()

	// Go doesn't preserve insertion order in its arrays so here we are inlining a sort.
	aliases := lib.GetArrayKeysSorted(SEPARATOR_NAMES_TO_VALUES)
	for _, alias := range aliases {
		// Really absurd level of indent needed to get fixed-with font in mkdocs here,
		// I don't know why. Usually it only takes 4, not 10.
		fmt.Printf("          %-10s = \"%s\"\n", alias, SEPARATOR_NAMES_TO_VALUES[alias])
	}
	fmt.Println()

	fmt.Println("  - Similarly, you can use the following for `--ifs-regex` and `--ips-regex`:")
	fmt.Println()
	aliases = lib.GetArrayKeysSorted(SEPARATOR_REGEX_NAMES_TO_VALUES)
	for _, alias := range aliases {
		fmt.Printf("          %-10s = \"%s\"\n", alias, SEPARATOR_REGEX_NAMES_TO_VALUES[alias])
	}
	fmt.Println()

	fmt.Println("* Default separators by format:")
	fmt.Println()

	formats := lib.GetArrayKeysSorted(defaultFSes)
	// Really absurd level of indent needed to get fixed-with font in mkdocs here,
	// I don't know why. Usually it only takes 4, not 8.
	fmt.Printf("        %-8s %-6s %-6s %-s\n", "Format", "FS", "PS", "RS")
	for _, format := range formats {
		defaultFS := "\"" + strings.ReplaceAll(defaultFSes[format], "\n", "\\n") + "\""
		defaultPS := "\"" + strings.ReplaceAll(defaultPSes[format], "\n", "\\n") + "\""
		defaultRS := "\"" + strings.ReplaceAll(defaultRSes[format], "\n", "\\n") + "\""
		if defaultFS == "\"N/A\"" {
			defaultFS = "N/A"
		}
		if defaultPS == "\"N/A\"" {
			defaultPS = "N/A"
		}
		if defaultRS == "\"N/A\"" {
			defaultRS = "N/A"
		}
		fmt.Printf("        %-8s %-6s %-6s %-s\n", format, defaultFS, defaultPS, defaultRS)
	}
}

func ListSeparatorAliasesForOnlineHelp() {
	// Go doesn't preserve insertion order in its arrays so here we are inlining a sort.
	aliases := lib.GetArrayKeysSorted(SEPARATOR_NAMES_TO_VALUES)
	for _, alias := range aliases {
		// Really absurd level of indent needed to get fixed-with font in mkdocs here,
		// I don't know why. Usually it only takes 4, not 10.
		fmt.Printf("%-10s = \"%s\"\n", alias, SEPARATOR_NAMES_TO_VALUES[alias])
	}
}

func ListSeparatorRegexAliasesForOnlineHelp() {
	// Go doesn't preserve insertion order in its arrays so here we are inlining a sort.
	aliases := lib.GetArrayKeysSorted(SEPARATOR_REGEX_NAMES_TO_VALUES)
	for _, alias := range aliases {
		// Really absurd level of indent needed to get fixed-with font in mkdocs here,
		// I don't know why. Usually it only takes 4, not 10.
		fmt.Printf("%-10s = \"%s\"\n", alias, SEPARATOR_REGEX_NAMES_TO_VALUES[alias])
	}
}

func init() { SeparatorFlagSection.Sort() }

var SeparatorFlagSection = FlagSection{
	name:        "Separator flags",
	infoPrinter: SeparatorPrintInfo,
	flags: []Flag{

		{
			name: "--ifs",
			arg:  "{string}",
			help: "Specify FS for input.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				// Backward compatibility with Miller <= 5. Auto-inference of
				// LF vs CR/LF line endings is handled within Go libraries so
				// we needn't do anything ourselves.
				if args[*pargi+1] != "auto" {
					options.ReaderOptions.IFS = SeparatorFromArg(args[*pargi+1])
					options.ReaderOptions.ifsWasSpecified = true
				}
				*pargi += 2
			},
		},

		{
			name: "--ifs-regex",
			arg:  "{string}",
			help: "Specify FS for input as a regular expression.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				// Backward compatibility with Miller <= 5. Auto-inference of
				// LF vs CR/LF line endings is handled within Go libraries so
				// we needn't do anything ourselves.
				if args[*pargi+1] != "auto" {
					options.ReaderOptions.IFSRegex = lib.CompileMillerRegexOrDie(SeparatorRegexFromArg(args[*pargi+1]))
					options.ReaderOptions.ifsWasSpecified = true
				}
				*pargi += 2
			},
		},

		{
			name: "--ips",
			arg:  "{string}",
			help: "Specify PS for input.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.IPS = SeparatorFromArg(args[*pargi+1])
				options.ReaderOptions.ipsWasSpecified = true
				*pargi += 2
			},
		},

		{
			name: "--ips-regex",
			arg:  "{string}",
			help: "Specify PS for input as a regular expression.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.IPSRegex = lib.CompileMillerRegexOrDie(SeparatorRegexFromArg(args[*pargi+1]))
				options.ReaderOptions.ipsWasSpecified = true
				*pargi += 2
			},
		},

		{
			name: "--irs",
			arg:  "{string}",
			help: "Specify RS for input.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				// Backward compatibility with Miller <= 5. Auto-inference of
				// LF vs CR/LF line endings is handled within Go libraries so
				// we needn't do anything ourselves.
				if args[*pargi+1] != "auto" {
					options.ReaderOptions.IRS = SeparatorFromArg(args[*pargi+1])
					options.ReaderOptions.irsWasSpecified = true
				}
				*pargi += 2
			},
		},

		{
			name: "--repifs",
			help: "Let IFS be repeated: e.g. for splitting on multiple spaces.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.AllowRepeatIFS = true
				options.ReaderOptions.allowRepeatIFSWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--ors",
			arg:  "{string}",
			help: "Specify RS for output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				// Backward compatibility with Miller <= 5. Auto-inference of
				// LF vs CR/LF line endings is handled within Go libraries so
				// we needn't do anything ourselves.
				if args[*pargi+1] != "auto" {
					options.WriterOptions.ORS = SeparatorFromArg(args[*pargi+1])
					options.WriterOptions.orsWasSpecified = true
				}
				*pargi += 2
			},
		},

		{
			name: "--ofs",
			arg:  "{string}",
			help: "Specify FS for output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.OFS = SeparatorFromArg(args[*pargi+1])
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 2
			},
		},

		{
			name: "--ops",
			arg:  "{string}",
			help: "Specify PS for output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.OPS = SeparatorFromArg(args[*pargi+1])
				options.WriterOptions.opsWasSpecified = true
				*pargi += 2
			},
		},

		{
			name: "--rs",
			arg:  "{string}",
			help: "Specify RS for input and output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				// Backward compatibility with Miller <= 5. Auto-inference of
				// LF vs CR/LF line endings is handled within Go libraries so
				// we needn't do anything ourselves.
				if args[*pargi+1] != "auto" {
					options.ReaderOptions.IRS = SeparatorFromArg(args[*pargi+1])
					options.WriterOptions.ORS = SeparatorFromArg(args[*pargi+1])
					options.ReaderOptions.irsWasSpecified = true
					options.WriterOptions.orsWasSpecified = true
				}
				*pargi += 2
			},
		},

		{
			name: "--fs",
			arg:  "{string}",
			help: "Specify FS for input and output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				// Backward compatibility with Miller <= 5. Auto-inference of
				// LF vs CR/LF line endings is handled within Go libraries so
				// we needn't do anything ourselves.
				if args[*pargi+1] != "auto" {
					options.ReaderOptions.IFS = SeparatorFromArg(args[*pargi+1])
					options.WriterOptions.OFS = SeparatorFromArg(args[*pargi+1])
					options.ReaderOptions.ifsWasSpecified = true
					options.WriterOptions.ofsWasSpecified = true
				}
				*pargi += 2
			},
		},

		{
			name: "--ps",
			arg:  "{string}",
			help: "Specify PS for input and output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.IPS = SeparatorFromArg(args[*pargi+1])
				options.WriterOptions.OPS = SeparatorFromArg(args[*pargi+1])
				options.ReaderOptions.ipsWasSpecified = true
				options.WriterOptions.opsWasSpecified = true
				*pargi += 2
			},
		},
	},
}

// ================================================================
// JSON-ONLY FLAGS

func JSONOnlyPrintInfo() {
	fmt.Println("These are flags which are applicable to JSON output format.")
}

func init() { JSONOnlyFlagSection.Sort() }

var JSONOnlyFlagSection = FlagSection{
	name:        "JSON-only flags",
	infoPrinter: JSONOnlyPrintInfo,
	flags: []Flag{

		{
			name: "--jvstack",
			help: "Put one key-value pair per line for JSON output (multi-line output). This is the default for JSON output format.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},

		{
			name: "--no-jvstack",
			help: "Put objects/arrays all on one line for JSON output. This is the default for JSON Lines output format.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.JSONOutputMultiline = false
				*pargi += 1
			},
		},

		{
			name:     "--jlistwrap",
			altNames: []string{"--jl"},
			help:     "Wrap JSON output in outermost `[ ]`. This is the default for JSON output format.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.WrapJSONOutputInOuterList = true
				*pargi += 1
			},
		},

		{
			name: "--no-jlistwrap",
			help: "Do not wrap JSON output in outermost `[ ]`. This is the default for JSON Lines output format.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.WrapJSONOutputInOuterList = false
				*pargi += 1
			},
		},

		{
			name: "--jvquoteall",
			help: "Force all JSON values -- recursively into lists and object -- to string.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.JVQuoteAll = true
				*pargi += 1
			},
		},
	},
}

// ================================================================
// PPRINT-ONLY FLAGS

func PPRINTOnlyPrintInfo() {
	fmt.Println("These are flags which are applicable to PPRINT format.")
}

func init() { PPRINTOnlyFlagSection.Sort() }

var PPRINTOnlyFlagSection = FlagSection{
	name:        "PPRINT-only flags",
	infoPrinter: PPRINTOnlyPrintInfo,
	flags: []Flag{

		{
			name: "--right",
			help: "Right-justifies all fields for PPRINT output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.RightAlignedPPRINTOutput = true
				*pargi += 1
			},
		},

		{
			name:     "--barred",
			altNames: []string{"--barred-output"},
			help:     "Prints a border around PPRINT output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},

		{
			name: "--barred-input",
			help: "When used in conjunction with --pprint, accepts barred input.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.BarredPprintInput = true
				options.ReaderOptions.IFS = "|"
				*pargi += 1
			},
		},
	},
}

// ================================================================
// DKVP-ONLY FLAGS

func DKVPOnlyPrintInfo() {
	fmt.Println("These are flags which are applicable to DKVP format.")
}

func init() { DKVPOnlyFlagSection.Sort() }

var DKVPOnlyFlagSection = FlagSection{
	name:        "DKVP-only flags",
	infoPrinter: DKVPOnlyPrintInfo,
	flags: []Flag{

		{
			name: "--incr-key",
			help: "Without this option, keyless DKVP fields are keyed by field number.  For example: `a=10,b=20,30,d=40,50` is ingested as `$a=10,$b=20,$3=30,$d=40,$5=50`.  With this option, they're keyed by a running counter of keyless fields.  For example: `a=10,b=20,30,d=40,50` is ingested as `$a=10,$b=20,$1=30,$d=40,$2=50`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
	},
}

// ================================================================
// LEGACY FLAGS

func LegacyFlagInfoPrint() {
	fmt.Println(`These are flags which don't do anything in the current Miller version.
They are accepted as no-op flags in order to keep old scripts from breaking.`)
}

func init() { LegacyFlagSection.Sort() }

var LegacyFlagSection = FlagSection{
	name:        "Legacy flags",
	infoPrinter: LegacyFlagInfoPrint,
	flags: []Flag{

		{
			name:   "--mmap",
			help:   "Miller no longer uses memory-mapping to access data files.",
			parser: NoOpParse1,
		},

		{
			name:   "--no-mmap",
			help:   "Miller no longer uses memory-mapping to access data files.",
			parser: NoOpParse1,
		},

		{
			name:   "--jsonx",
			help:   "The `--jvstack` flag is now default true in Miller 6.",
			parser: NoOpParse1,
		},
		{
			name:   "--ojsonx",
			help:   "The `--jvstack` flag is now default true in Miller 6.",
			parser: NoOpParse1,
		},

		{
			name:   "--jknquoteint",
			help:   "Type information from JSON input files is now preserved throughout the processing stream.",
			parser: NoOpParse1,
		},

		{
			name:   "--jquoteall",
			help:   "Type information from JSON input files is now preserved throughout the processing stream.",
			parser: NoOpParse1,
		},

		{
			name:   "--json-fatal-arrays-on-input",
			help:   "Miller now supports arrays as of version 6.",
			parser: NoOpParse1,
		},

		{
			name:   "--json-map-arrays-on-input",
			help:   "Miller now supports arrays as of version 6.",
			parser: NoOpParse1,
		},

		{
			name:   "--json-skip-arrays-on-input",
			help:   "Miller now supports arrays as of version 6.",
			parser: NoOpParse1,
		},

		{
			name:   "--vflatsep",
			help:   "Ignored as of version 6. This functionality is subsumed into JSON formatting.",
			parser: NoOpParse1,
		},

		{
			name:   "--quote-none",
			help:   "Ignored as of version 6. Types are inferred/retained through the processing flow now.",
			parser: NoOpParse1,
		},
		{
			name:   "--quote-minimal",
			help:   "Ignored as of version 6. Types are inferred/retained through the processing flow now.",
			parser: NoOpParse1,
		},
		{
			name:   "--quote-numeric",
			help:   "Ignored as of version 6. Types are inferred/retained through the processing flow now.",
			parser: NoOpParse1,
		},
		{
			name:   "--quote-original",
			help:   "Ignored as of version 6. Types are inferred/retained through the processing flow now.",
			parser: NoOpParse1,
		},
	},
}

// ================================================================
// FILE-FORMAT FLAGS

func FileFormatPrintInfo() {
	fmt.Println(`See the File formats doc page, and or ` + "`mlr help file-formats`" + `, for more
about file formats Miller supports.

Examples: ` + "`--csv`" + ` for CSV-formatted input and output; ` + "`--icsv --opprint`" + ` for
CSV-formatted input and pretty-printed output.

Please use ` + "`--iformat1 --oformat2`" + ` rather than ` + "`--format1 --oformat2`" + `.
The latter sets up input and output flags for ` + "`format1`" + `, not all of which
are overridden in all cases by setting output format to ` + "`format2`" + `.`)
}

func init() { FileFormatFlagSection.Sort() }

var FileFormatFlagSection = FlagSection{
	name:        "File-format flags",
	infoPrinter: FileFormatPrintInfo,
	flags: []Flag{

		{
			name: "--icsv",
			help: "Use CSV format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				*pargi += 1
			},
		},

		{
			name: "--icsvlite",
			help: "Use CSV-lite format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				*pargi += 1
			},
		},

		{
			name: "--itsv",
			help: "Use TSV format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				*pargi += 1
			},
		},
		{
			name: "--itsvlite",
			help: "Use TSV-lite format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.ReaderOptions.IFS = "\t"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--iasv",
			altNames: []string{"--iasvlite"},
			help:     "Use ASV format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.ReaderOptions.IFS = ASV_FS
				options.ReaderOptions.IRS = ASV_RS
				options.ReaderOptions.ifsWasSpecified = true
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--iusv",
			altNames: []string{"--iusvlite"},
			help:     "Use USV format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.ReaderOptions.IFS = USV_FS
				options.ReaderOptions.IRS = USV_RS
				options.ReaderOptions.ifsWasSpecified = true
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--idkvp",
			help: "Use DKVP format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				*pargi += 1
			},
		},

		{
			name: "--ijson",
			help: "Use JSON format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				*pargi += 1
			},
		},

		{
			name: "--ijsonl",
			help: "Use JSON Lines format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				*pargi += 1
			},
		},

		{
			name: "--inidx",
			help: "Use NIDX format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				*pargi += 1
			},
		},

		{
			name: "--ixtab",
			help: "Use XTAB format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				*pargi += 1
			},
		},

		{
			name: "--ipprint",
			help: "Use PPRINT format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "-i",
			arg:  "{format name}",
			help: "Use format name for input data. For example: `-i csv` is the same as `--icsv`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.InputFileFormat = args[*pargi+1]
				if options.ReaderOptions.InputFileFormat == "md" {
					options.ReaderOptions.InputFileFormat = "markdown" // alias
				}
				*pargi += 2
			},
		},

		{
			name: "--igen",
			help: `Ignore input files and instead generate sequential numeric input using --gen-field-name,
--gen-start, --gen-step, and --gen-stop values. See also the seqgen verb, which is more useful/intuitive.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "gen"
				*pargi += 1
			},
		},
		{
			name: "--gen-field-name",
			help: `Specify field name for --igen. Defaults to "` + DEFAULT_GEN_FIELD_NAME + `".`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "gen"
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.GeneratorOptions.FieldName = args[*pargi+1]
				*pargi += 2
			},
		},
		{
			name: "--gen-start",
			help: "Specify start value for --igen. Defaults to " + DEFAULT_GEN_START_AS_STRING + ".",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "gen"
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.GeneratorOptions.StartAsString = args[*pargi+1]
				*pargi += 2
			},
		},
		{
			name: "--gen-step",
			help: "Specify step value for --igen. Defaults to " + DEFAULT_GEN_STEP_AS_STRING + ".",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "gen"
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.GeneratorOptions.StepAsString = args[*pargi+1]
				*pargi += 2
			},
		},
		{
			name: "--gen-stop",
			help: "Specify stop value for --igen. Defaults to " + DEFAULT_GEN_STOP_AS_STRING + ".",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "gen"
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.GeneratorOptions.StopAsString = args[*pargi+1]
				*pargi += 2
			},
		},

		{
			name: "-o",
			arg:  "{format name}",
			help: "Use format name for output data.  For example: `-o csv` is the same as `--ocsv`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.OutputFileFormat = args[*pargi+1]
				if options.WriterOptions.OutputFileFormat == "md" {
					options.WriterOptions.OutputFileFormat = "markdown" // alias
				}
				*pargi += 2
			},
		},

		{
			name: "--ocsv",
			help: "Use CSV format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "csv"
				*pargi += 1
			},
		},

		{
			name: "--ocsvlite",
			help: "Use CSV-lite format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "csvlite"
				*pargi += 1
			},
		},

		{
			name: "--otsv",
			help: "Use TSV format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "tsv"
				options.WriterOptions.OFS = "\t"
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--otsvlite",
			help: "Use TSV-lite format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "csvlite"
				options.WriterOptions.OFS = "\t"
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--oasv",
			altNames: []string{"--oasvlite"},
			help:     "Use ASV format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "csvlite"
				options.WriterOptions.OFS = ASV_FS
				options.WriterOptions.ORS = ASV_RS
				options.WriterOptions.ofsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--ousv",
			altNames: []string{"--ousvlite"},
			help:     "Use USV format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "csvlite"
				options.WriterOptions.OFS = USV_FS
				options.WriterOptions.ORS = USV_RS
				options.WriterOptions.ofsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--imd",
			altNames: []string{"--imarkdown"},
			help:     "Use markdown-tabular format for input data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name:     "--omd",
			altNames: []string{"--omarkdown"},
			help:     "Use markdown-tabular format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name: "--odkvp",
			help: "Use DKVP format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},

		{
			name: "--ojson",
			help: "Use JSON format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},

		{
			name: "--ojsonl",
			help: "Use JSON Lines format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "jsonl"
				*pargi += 1
			},
		},

		{
			name: "--onidx",
			help: "Use NIDX format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "nidx"
				options.WriterOptions.OFS = " "
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--oxtab",
			help: "Use XTAB format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},

		{
			name: "--opprint",
			help: "Use PPRINT format for output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},

		{
			name: "--io",
			arg:  "{format name}",
			help: "Use format name for input and output data. For example: `--io csv` is the same as `--csv`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				if defaultFSes[args[*pargi+1]] == "" {
					fmt.Fprintf(os.Stderr, "mlr: unrecognized I/O format \"%s\".\n",
						args[*pargi+1])
					os.Exit(1)
				}
				options.ReaderOptions.InputFileFormat = args[*pargi+1]
				options.WriterOptions.OutputFileFormat = args[*pargi+1]
				*pargi += 2
			},
		},

		{
			name:     "--csv",
			help:     "Use CSV format for input and output data.",
			altNames: []string{"-c", "--c2c"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "csv"
				*pargi += 1
			},
		},

		{
			name: "--csvlite",
			help: "Use CSV-lite format for input and output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.WriterOptions.OutputFileFormat = "csvlite"
				*pargi += 1
			},
		},

		{
			name:     "--tsv",
			help:     "Use TSV format for input and output data.",
			altNames: []string{"-t", "--t2t"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "tsv"
				*pargi += 1
			},
		},

		{
			name: "--tsvlite",
			help: "Use TSV-lite format for input and output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.WriterOptions.OutputFileFormat = "csvlite"
				options.ReaderOptions.IFS = "\t"
				options.WriterOptions.OFS = "\t"
				options.ReaderOptions.ifsWasSpecified = true
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--asv",
			altNames: []string{"--asvlite"},
			help:     "Use ASV format for input and output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.WriterOptions.OutputFileFormat = "csvlite"
				options.ReaderOptions.IFS = ASV_FS
				options.WriterOptions.OFS = ASV_FS
				options.ReaderOptions.IRS = ASV_RS
				options.WriterOptions.ORS = ASV_RS
				options.ReaderOptions.ifsWasSpecified = true

				options.ReaderOptions.ifsWasSpecified = true
				options.ReaderOptions.irsWasSpecified = true
				options.WriterOptions.ofsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--usv",
			altNames: []string{"--usvlite"},
			help:     "Use USV format for input and output data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csvlite"
				options.WriterOptions.OutputFileFormat = "csvlite"
				options.ReaderOptions.IFS = USV_FS
				options.WriterOptions.OFS = USV_FS
				options.ReaderOptions.IRS = USV_RS
				options.WriterOptions.ORS = USV_RS
				options.ReaderOptions.ifsWasSpecified = true
				options.ReaderOptions.irsWasSpecified = true
				options.WriterOptions.ofsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name:     "--dkvp",
			help:     "Use DKVP format for input and output data.",
			altNames: []string{"--d2d"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},

		{
			name:     "--json",
			help:     "Use JSON format for input and output data.",
			altNames: []string{"-j", "--j2j"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},

		{
			name:     "--jsonl",
			help:     "Use JSON Lines format for input and output data.",
			altNames: []string{"--l2l"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "jsonl"
				*pargi += 1
			},
		},

		{
			name:     "--nidx",
			help:     "Use NIDX format for input and output data.",
			altNames: []string{"--n2n"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "nidx"
				*pargi += 1
			},
		},

		{
			name:     "--xtab",
			help:     "Use XTAB format for input and output data.",
			altNames: []string{"--x2x"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},

		{
			name: "--xvright",
			help: "Right-justify values for XTAB format.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.RightAlignedXTABOutput = true
				*pargi += 1
			},
		},

		{
			name:     "--pprint",
			help:     "Use PPRINT format for input and output data.",
			altNames: []string{"--p2p"},
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.ReaderOptions.ifsWasSpecified = true
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
	},
}

// ================================================================
// FORMAT-CONVERSION KEYSTROKE-SAVER FLAGS

func FormatConversionKeystrokeSaverPrintInfo() {
	fmt.Println(`As keystroke-savers for format-conversion you may use the following.
The letters c, t, j, l, d, n, x, p, and m refer to formats CSV, TSV, DKVP, NIDX,
JSON, JSON Lines, XTAB, PPRINT, and markdown, respectively.

| In\out   | CSV      | TSV      | JSON     | JSONL | DKVP  | NIDX  | XTAB  | PPRINT | Markdown |
+----------+----------+----------+----------+-------+-------+-------+-------+--------+----------|
| CSV      | --c2c,-c | --c2t    | --c2j    | --c2l | --c2d | --c2n | --c2x | --c2p  | --c2m    |
| TSV      | --t2c    | --t2t,-t | --t2j    | --t2l | --t2d | --t2n | --t2x | --t2p  | --t2m    |
| JSON     | --j2c    | --j2t    | --j2j,-j | --j2l | --j2d | --j2n | --j2x | --j2p  | --j2m    |
| JSONL    | --l2c    | --l2t    | --l2j    | --l2l | --l2d | --l2n | --l2x | --l2p  | --l2m    |
| DKVP     | --d2c    | --d2t    | --d2j    | --d2l | --d2d | --d2n | --d2x | --d2p  | --d2m    |
| NIDX     | --n2c    | --n2t    | --n2j    | --n2l | --n2d | --n2n | --n2x | --n2p  | --n2m    |
| XTAB     | --x2c    | --x2t    | --x2j    | --x2l | --x2d | --x2n | --x2x | --x2p  | --x2m    |
| PPRINT   | --p2c    | --p2t    | --p2j    | --p2l | --p2d | --p2n | --p2x | -p2p   | --p2m    |
| Markdown | --m2c    | --m2t    | --m2j    | --m2l | --m2d | --m2n | --m2x | --m2p  |          |`)
}

func init() { FormatConversionKeystrokeSaverFlagSection.Sort() }

var FormatConversionKeystrokeSaverFlagSection = FlagSection{
	name:        "Format-conversion keystroke-saver flags",
	infoPrinter: FormatConversionKeystrokeSaverPrintInfo,

	flags: []Flag{

		{
			name: "-p",
			help: "Keystroke-saver for `--nidx --fs space --repifs`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "nidx"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OFS = " "
				options.ReaderOptions.ifsWasSpecified = true
				options.WriterOptions.ofsWasSpecified = true
				options.ReaderOptions.AllowRepeatIFS = true
				options.ReaderOptions.allowRepeatIFSWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "-T",
			help: "Keystroke-saver for `--nidx --fs tab`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "nidx"
				options.ReaderOptions.IFS = "\t"
				options.WriterOptions.OFS = "\t"
				options.ReaderOptions.ifsWasSpecified = true
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--c2t",
			help: "Use CSV for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "tsv"
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2d",
			help: "Use CSV for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "dkvp"
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2n",
			help: "Use CSV for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "nidx"
				options.WriterOptions.OFS = " "
				options.ReaderOptions.irsWasSpecified = true
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2j",
			help: "Use CSV for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2l",
			help: "Use CSV for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2p",
			help: "Use CSV for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2m",
			help: "Use CSV for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--c2b",
			help: "Use CSV for input, PPRINT with `--barred` for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2x",
			help: "Use CSV for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "xtab"
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--c2m",
			help: "Use CSV for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "csv"
				options.WriterOptions.OutputFileFormat = "markdown"
				options.ReaderOptions.irsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--t2c",
			help: "Use TSV for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "csv"
				*pargi += 1
			},
		},
		{
			name: "--t2d",
			help: "Use TSV for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},
		{
			name: "--t2n",
			help: "Use TSV for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "nidx"
				options.WriterOptions.OFS = " "
				options.WriterOptions.ofsWasSpecified = true
				options.ReaderOptions.CSVLazyQuotes = true
				*pargi += 1
			},
		},
		{
			name: "--t2j",
			help: "Use TSV for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},
		{
			name: "--t2l",
			help: "Use TSV for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				*pargi += 1
			},
		},
		{
			name: "--t2p",
			help: "Use TSV for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
		{
			name: "--t2m",
			help: "Use TSV for input, markdown tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--t2b",
			help: "Use TSV for input, PPRINT with `--barred` for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
		{
			name: "--t2x",
			help: "Use TSV for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},
		{
			name: "--t2m",
			help: "Use TSV for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "tsv"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name: "--d2c",
			help: "Use DKVP for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "csv"
				*pargi += 1
			},
		},
		{
			name: "--d2t",
			help: "Use DKVP for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "tsv"
				options.WriterOptions.OFS = "\t"
				options.WriterOptions.ofsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--d2n",
			help: "Use DKVP for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "nidx"
				options.WriterOptions.OFS = " "
				options.WriterOptions.ofsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--d2j",
			help: "Use DKVP for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},
		{
			name: "--d2l",
			help: "Use DKVP for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				*pargi += 1
			},
		},
		{
			name: "--d2p",
			help: "Use DKVP for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
		{
			name: "--d2m",
			help: "Use DKVP for input, markdown tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--d2b",
			help: "Use DKVP for input, PPRINT with `--barred` for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
		{
			name: "--d2x",
			help: "Use DKVP for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},
		{
			name: "--d2m",
			help: "Use DKVP for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "dkvp"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name: "--n2c",
			help: "Use NIDX for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "csv"
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--n2t",
			help: "Use NIDX for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "tsv"
				*pargi += 1
			},
		},
		{
			name: "--n2d",
			help: "Use NIDX for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},
		{
			name: "--n2j",
			help: "Use NIDX for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},
		{
			name: "--n2l",
			help: "Use NIDX for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				*pargi += 1
			},
		},
		{
			name: "--n2p",
			help: "Use NIDX for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
		{
			name: "--n2m",
			help: "Use NIDX for input, markdown tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--n2b",
			help: "Use NIDX for input, PPRINT with `--barred` for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
		{
			name: "--n2x",
			help: "Use NIDX for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},
		{
			name: "--n2m",
			help: "Use NIDX for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "nidx"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name: "--j2c",
			help: "Use JSON for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "csv"
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--j2l",
			help: "Use JSON for input, JSONL for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				*pargi += 1
			},
		},

		{
			name: "--j2t",
			help: "Use JSON for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "tsv"
				*pargi += 1
			},
		},
		{
			name: "--j2d",
			help: "Use JSON for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},
		{
			name: "--j2n",
			help: "Use JSON for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "nidx"
				*pargi += 1
			},
		},
		{
			name: "--j2p",
			help: "Use JSON for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
		{
			name: "--j2m",
			help: "Use JSON for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--j2b",
			help: "Use JSON for input, PPRINT with --barred for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
		{
			name: "--j2x",
			help: "Use JSON for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},
		{
			name: "--j2m",
			help: "Use JSON for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name: "--l2c",
			help: "Use JSON Lines for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "csv"
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--l2t",
			help: "Use JSON Lines for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "tsv"
				*pargi += 1
			},
		},
		{
			name: "--l2d",
			help: "Use JSON Lines for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},
		{
			name: "--l2j",
			help: "Use JSONL for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "json"
				*pargi += 1
			},
		},
		{
			name: "--l2n",
			help: "Use JSON Lines for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "nidx"
				*pargi += 1
			},
		},
		{
			name: "--l2p",
			help: "Use JSON Lines for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
		{
			name: "--l2m",
			help: "Use JSON Lines for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--l2b",
			help: "Use JSON Lines for input, PPRINT with --barred for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
		{
			name: "--l2x",
			help: "Use JSON Lines for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "xtab"
				*pargi += 1
			},
		},
		{
			name: "--l2m",
			help: "Use JSON Lines for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "json"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},

		{
			name: "--p2c",
			help: "Use PPRINT for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "csv"
				options.ReaderOptions.ifsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2t",
			help: "Use PPRINT for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "tsv"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2d",
			help: "Use PPRINT for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "dkvp"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2n",
			help: "Use PPRINT for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "nidx"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2j",
			help: "Use PPRINT for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2l",
			help: "Use PPRINT for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2x",
			help: "Use PPRINT for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "xtab"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--p2m",
			help: "Use PPRINT for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "pprint"
				options.ReaderOptions.IFS = " "
				options.WriterOptions.OutputFileFormat = "markdown"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--m2c",
			help: "Use markdown-tabular for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "csv"
				options.ReaderOptions.ifsWasSpecified = true
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2t",
			help: "Use markdown-tabular for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "tsv"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2d",
			help: "Use markdown-tabular for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "dkvp"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2n",
			help: "Use markdown-tabular for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "nidx"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2j",
			help: "Use markdown-tabular for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2l",
			help: "Use markdown-tabular for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2x",
			help: "Use markdown-tabular for input, XTAB for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "xtab"
				options.ReaderOptions.ifsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--m2p",
			help: "Use markdown-tabular for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "markdown"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},

		{
			name: "--x2c",
			help: "Use XTAB for input, CSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "csv"
				options.WriterOptions.orsWasSpecified = true
				*pargi += 1
			},
		},
		{
			name: "--x2t",
			help: "Use XTAB for input, TSV for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "tsv"
				*pargi += 1
			},
		},
		{
			name: "--x2d",
			help: "Use XTAB for input, DKVP for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "dkvp"
				*pargi += 1
			},
		},
		{
			name: "--x2n",
			help: "Use XTAB for input, NIDX for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "nidx"
				*pargi += 1
			},
		},
		{
			name: "--x2j",
			help: "Use XTAB for input, JSON for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = true
				options.WriterOptions.JSONOutputMultiline = true
				*pargi += 1
			},
		},
		{
			name: "--x2l",
			help: "Use XTAB for input, JSON Lines for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "json"
				options.WriterOptions.WrapJSONOutputInOuterList = false
				options.WriterOptions.JSONOutputMultiline = false
				*pargi += 1
			},
		},
		{
			name: "--x2p",
			help: "Use XTAB for input, PPRINT for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "pprint"
				*pargi += 1
			},
		},
		{
			name: "--x2m",
			help: "Use XTAB for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
		{
			name: "--x2b",
			help: "Use XTAB for input, PPRINT with `--barred` for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "pprint"
				options.WriterOptions.BarredPprintOutput = true
				*pargi += 1
			},
		},
		{
			name: "--x2m",
			help: "Use XTAB for input, markdown-tabular for output.",
			// For format-conversion keystroke-savers, a matrix is plenty -- we don't
			// need to print a tedious 60-line list.
			suppressFlagEnumeration: true,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.InputFileFormat = "xtab"
				options.WriterOptions.OutputFileFormat = "markdown"
				*pargi += 1
			},
		},
	},
}

// ================================================================
// CSV/TSV FLAGS

func CSVTSVOnlyPrintInfo() {
	fmt.Println("These are flags which are applicable to CSV format.")
}

func init() { CSVTSVOnlyFlagSection.Sort() }

var CSVTSVOnlyFlagSection = FlagSection{
	name:        "CSV/TSV-only flags",
	infoPrinter: CSVTSVOnlyPrintInfo,
	flags: []Flag{

		{
			name:     "--no-implicit-csv-header",
			altNames: []string{"--no-implicit-tsv-header"},
			help:     "Opposite of `--implicit-csv-header`. This is the default anyway -- the main use is for the flags to `mlr join` if you have main file(s) which are headerless but you want to join in on a file which does have a CSV/TSV header. Then you could use `mlr --csv --implicit-csv-header join --no-implicit-csv-header -l your-join-in-with-header.csv ... your-headerless.csv`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.UseImplicitHeader = false
				*pargi += 1
			},
		},

		{
			name:     "--allow-ragged-csv-input",
			altNames: []string{"--ragged", "--allow-ragged-tsv-input"},
			help:     "If a data line has fewer fields than the header line, fill remaining keys with empty string. If a data line has more fields than the header line, use integer field labels as in the implicit-header case.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.AllowRaggedCSVInput = true
				*pargi += 1
			},
		},

		{
			name: "--no-auto-unsparsify",
			help: "For CSV/TSV output: if the record keys change from one row to another, emit a blank line and a new header line. This is non-compliant with RFC 4180 but it helpful for heterogeneous data.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.NoAutoUnsparsify = true
				*pargi += 1
			},
		},

		{
			name:     "--implicit-csv-header",
			altNames: []string{"--headerless-csv-input", "--hi", "--implicit-tsv-header"},
			help:     "Use 1,2,3,... as field labels, rather than from line 1 of input files. Tip: combine with `label` to recreate missing headers.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.UseImplicitHeader = true
				*pargi += 1
			},
		},

		{
			name:     "--headerless-csv-output",
			altNames: []string{"--ho", "--headerless-tsv-output"},
			help:     "Print only CSV/TSV data lines; do not print CSV/TSV header lines.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.HeaderlessOutput = true
				*pargi += 1
			},
		},

		{
			name: "-N",
			help: "Keystroke-saver for `--implicit-csv-header --headerless-csv-output`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.UseImplicitHeader = true
				options.WriterOptions.HeaderlessOutput = true
				*pargi += 1
			},
		},

		{
			name: "--lazy-quotes",
			help: "Accepts quotes appearing in unquoted fields, and non-doubled quotes appearing in quoted fields.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.CSVLazyQuotes = true
				*pargi += 1
			},
		},

		{
			name: "--csv-trim-leading-space",
			help: `Trims leading spaces in CSV data. Use this for data like '"foo", "bar' which is non-RFC-4180 compliant, but common.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.CSVTrimLeadingSpace = true
				*pargi += 1
			},
		},

		{
			name: "--quote-all",
			help: "Force double-quoting of CSV fields.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.CSVQuoteAll = true
				*pargi += 1
			},
		},
	},
}

// ================================================================
// COMPRESSED-DATA FLAGS

func CompressedDataPrintInfo() {
	fmt.Print(`Miller offers a few different ways to handle reading data files
	which have been compressed.

* Decompression done within the Miller process itself: ` + "`--bz2in`" + ` ` + "`--gzin`" + ` ` + "`--zin`" + "`--zstdin`" +
		`
* Decompression done outside the Miller process: ` + "`--prepipe`" + ` ` + "`--prepipex`" + `

Using ` + "`--prepipe`" + ` and ` + "`--prepipex`" + ` you can specify an action to be
taken on each input file.  The prepipe command must be able to read from
standard input; it will be invoked with ` + "`{command} < {filename}`" + `.  The
prepipex command must take a filename as argument; it will be invoked with
` + "`{command} {filename}`" + `.

Examples:

    mlr --prepipe gunzip
    mlr --prepipe zcat -cf
    mlr --prepipe xz -cd
    mlr --prepipe cat

Note that this feature is quite general and is not limited to decompression
utilities. You can use it to apply per-file filters of your choice.  For output
compression (or other) utilities, simply pipe the output:
` + "`mlr ... | {your compression command} > outputfilenamegoeshere`" + `

Lastly, note that if ` + "`--prepipe`" + ` or ` + "`--prepipex`" + ` is specified, it replaces any
decisions that might have been made based on the file suffix. Likewise,
` + "`--gzin`" + `/` + "`--bz2in`" + `/` + "`--zin`" + "`--zin`" + ` are ignored if ` + "`--prepipe`" + ` is also specified.
`)
}

func init() { CompressedDataFlagSection.Sort() }

var CompressedDataFlagSection = FlagSection{
	name:        "Compressed-data flags",
	infoPrinter: CompressedDataPrintInfo,
	flags: []Flag{

		{
			name: "--prepipe",
			arg:  "{decompression command}",
			help: "You can, of course, already do without this for single input files, e.g. `gunzip < myfile.csv.gz | mlr ...`.  Allowed at the command line, but not in `.mlrrc` to avoid unexpected code execution.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.Prepipe = args[*pargi+1]
				options.ReaderOptions.PrepipeIsRaw = false
				*pargi += 2
			},
		},

		{
			name: "--prepipex",
			arg:  "{decompression command}",
			help: "Like `--prepipe` with one exception: doesn't insert `<` between command and filename at runtime. Useful for some commands like `unzip -qc` which don't read standard input.  Allowed at the command line, but not in `.mlrrc` to avoid unexpected code execution.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.Prepipe = args[*pargi+1]
				options.ReaderOptions.PrepipeIsRaw = true
				*pargi += 2
			},
		},

		{
			name: "--prepipe-gunzip",
			help: "Same as  `--prepipe gunzip`, except this is allowed in `.mlrrc`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.Prepipe = "gunzip"
				options.ReaderOptions.PrepipeIsRaw = false
				*pargi += 1
			},
		},

		{
			name: "--prepipe-zcat",
			help: "Same as  `--prepipe zcat`, except this is allowed in `.mlrrc`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.Prepipe = "zcat"
				options.ReaderOptions.PrepipeIsRaw = false
				*pargi += 1
			},
		},

		{
			name: "--prepipe-zstdcat",
			help: "Same as  `--prepipe zstdcat`, except this is allowed in `.mlrrc`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.Prepipe = "zstdcat"
				options.ReaderOptions.PrepipeIsRaw = false
				*pargi += 1
			},
		},

		{
			name: "--prepipe-bz2",
			help: "Same as  `--prepipe bz2`, except this is allowed in `.mlrrc`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.Prepipe = "bz2"
				options.ReaderOptions.PrepipeIsRaw = false
				*pargi += 1
			},
		},

		{
			name: "--gzin",
			help: "Uncompress gzip within the Miller process. Done by default if file ends in `.gz`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.FileInputEncoding = lib.FileInputEncodingGzip
				*pargi += 1
			},
		},

		{
			name: "--zin",
			help: "Uncompress zlib within the Miller process. Done by default if file ends in `.z`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.FileInputEncoding = lib.FileInputEncodingZlib
				*pargi += 1
			},
		},

		{
			name: "--bz2in",
			help: "Uncompress bzip2 within the Miller process. Done by default if file ends in `.bz2`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.FileInputEncoding = lib.FileInputEncodingBzip2
				*pargi += 1
			},
		},

		{
			name: "--zstdin",
			help: "Uncompress zstd within the Miller process. Done by default if file ends in `.zstd`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.FileInputEncoding = lib.FileInputEncodingZstd
				*pargi += 1
			},
		},
	},
}

// ================================================================
// COMMENTS-IN-DATA FLAGS

func CommentsInDataPrintInfo() {
	fmt.Printf(`Miller lets you put comments in your data, such as

    # This is a comment for a CSV file
    a,b,c
    1,2,3
    4,5,6

Notes:

* Comments are only honored at the start of a line.
* In the absence of any of the below four options, comments are data like
  any other text. (The comments-in-data feature is opt-in.)
* When ` + "`--pass-comments`" + ` is used, comment lines are written to standard output
  immediately upon being read; they are not part of the record stream.  Results
  may be counterintuitive. A suggestion is to place comments at the start of
  data files.
`)
}

func init() { CommentsInDataFlagSection.Sort() }

var CommentsInDataFlagSection = FlagSection{
	name:        "Comments-in-data flags",
	infoPrinter: CommentsInDataPrintInfo,
	flags: []Flag{

		{
			name: "--skip-comments",
			help: "Ignore commented lines (prefixed by `" + DEFAULT_COMMENT_STRING + "`) within the input.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.CommentString = DEFAULT_COMMENT_STRING
				options.ReaderOptions.CommentHandling = SkipComments
				*pargi += 1
			},
		},

		{
			name: "--skip-comments-with",
			arg:  "{string}",
			help: "Ignore commented lines within input, with specified prefix. For CSV input format, the prefix must be a single character.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.CommentString = args[*pargi+1]
				options.ReaderOptions.CommentHandling = SkipComments
				*pargi += 2
			},
		},

		{
			name: "--pass-comments",
			help: "Immediately print commented lines (prefixed by `" + DEFAULT_COMMENT_STRING + "`) within the input.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.CommentString = DEFAULT_COMMENT_STRING
				options.ReaderOptions.CommentHandling = PassComments
				*pargi += 1
			},
		},

		{
			name: "--pass-comments-with",
			arg:  "{string}",
			help: "Immediately print commented lines within input, with specified prefix. For CSV input format, the prefix must be a single character.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.ReaderOptions.CommentString = args[*pargi+1]
				options.ReaderOptions.CommentHandling = PassComments
				*pargi += 2
			},
		},
	},
}

// ================================================================
// OUTPUT-COLORIZATION FLAGS

func OutputColorizationPrintInfo() {
	fmt.Print(`Miller uses colors to highlight outputs. You can specify color preferences.
Note: output colorization does not work on Windows.

Things having colors:

* Keys in CSV header lines, JSON keys, etc
* Values in CSV data lines, JSON scalar values, etc in regression-test output
* Some online-help strings

Rules for coloring:

* By default, colorize output only if writing to stdout and stdout is a TTY.
    * Example: color: ` + "`mlr --csv cat foo.csv`" + `
    * Example: no color: ` + "`mlr --csv cat foo.csv > bar.csv`" + `
    * Example: no color: ` + "`mlr --csv cat foo.csv | less`" + `
* The default colors were chosen since they look OK with white or black
  terminal background, and are differentiable with common varieties of human
  color vision.

Mechanisms for coloring:

* Miller uses ANSI escape sequences only. This does not work on Windows
  except within Cygwin.
* Requires ` + "`TERM`" + ` environment variable to be set to non-empty string.
* Doesn't try to check to see whether the terminal is capable of 256-color
  ANSI vs 16-color ANSI. Note that if colors are in the range 0..15
  then 16-color ANSI escapes are used, so this is in the user's control.

How you can control colorization:

* Suppression/unsuppression:
    * Environment variable ` + "`export MLR_NO_COLOR=true` or `export NO_COLOR=true`" + `
	  means don't color even if stdout+TTY.
    * Environment variable ` + "`export MLR_ALWAYS_COLOR=true`" + ` means do color
      even if not stdout+TTY.
      For example, you might want to use this when piping mlr output to ` + "`less -r`" + `.
    * Command-line flags ` + "`--no-color`" + ` or ` + "`-M`" + `, ` + "`--always-color`" + ` or ` + "`-C`" + `.

* Color choices can be specified by using environment variables, or command-line
  flags, with values 0..255:
    * ` + "`export MLR_KEY_COLOR=208`" + `, ` + "`MLR_VALUE_COLOR=33`" + `, etc.:
        ` + "`MLR_KEY_COLOR`" + ` ` + "`MLR_VALUE_COLOR`" + ` ` + "`MLR_PASS_COLOR`" + ` ` + "`MLR_FAIL_COLOR`" + `
        ` + "`MLR_REPL_PS1_COLOR`" + ` ` + "`MLR_REPL_PS2_COLOR`" + ` ` + "`MLR_HELP_COLOR`" + `
    * Command-line flags ` + "`--key-color 208`" + `, ` + "`--value-color 33`" + `, etc.:
        ` + "`--key-color`" + ` ` + "`--value-color`" + ` ` + "`--pass-color`" + ` ` + "`--fail-color`" + `
        ` + "`--repl-ps1-color`" + ` ` + "`--repl-ps2-color`" + ` ` + "`--help-color`" + `
    * This is particularly useful if your terminal's background color clashes
      with current settings.

If environment-variable settings and command-line flags are both provided, the
latter take precedence.

Colors can be specified using names such as "red" or "orchid": please see
` + "`mlr --list-color-names`" + ` to see available names. They can also be specified using
numbers in the range 0..255, like 170: please see ` + "`mlr --list-color-codes`" + `.
You can also use "bold", "underline", and/or "reverse". Additionally, combinations of
those can be joined with a "-", like "red-bold", "bold-170", "bold-underline", etc.
`)
}

func init() { OutputColorizationFlagSection.Sort() }

var OutputColorizationFlagSection = FlagSection{
	name:        "Output-colorization flags",
	infoPrinter: OutputColorizationPrintInfo,
	flags: []Flag{

		{
			name: "--list-color-codes",
			help: "Show the available color codes in the range 0..255, such as 170 for example.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				colorizer.ListColorCodes()
				os.Exit(0)
			},
		},

		{
			name: "--list-color-names",
			help: "Show the names for the available color codes, such as `orchid` for example.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				colorizer.ListColorNames()
				os.Exit(0)
			},
		},

		{
			name:     "--no-color",
			altNames: []string{"-M"},
			help:     "Instructs Miller to not colorize any output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				colorizer.SetColorization(colorizer.ColorizeOutputNever)
				*pargi += 1
			},
		},

		{
			name:     "--always-color",
			altNames: []string{"-C"},
			help:     "Instructs Miller to colorize output even when it normally would not. Useful for piping output to `less -r`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				colorizer.SetColorization(colorizer.ColorizeOutputAlways)
				*pargi += 1
			},
		},

		{
			name: "--key-color",
			help: "Specify the color (see `--list-color-codes` and `--list-color-names`) for record keys.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				ok := colorizer.SetKeyColor(args[*pargi+1])
				if !ok {
					fmt.Fprintf(os.Stderr,
						"mlr: --key-color argument unrecognized; got \"%s\".\n",
						args[*pargi+1])
					os.Exit(1)
				}
				*pargi += 2
			},
		},

		{
			name: "--value-color",
			help: "Specify the color (see `--list-color-codes` and `--list-color-names`) for record values.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				ok := colorizer.SetValueColor(args[*pargi+1])
				if !ok {
					fmt.Fprintf(os.Stderr,
						"mlr: --value-color argument unrecognized; got \"%s\".\n",
						args[*pargi+1])
					os.Exit(1)
				}
				*pargi += 2
			},
		},

		{
			name: "--pass-color",
			help: "Specify the color (see `--list-color-codes` and `--list-color-names`) for passing cases in `mlr regtest`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				ok := colorizer.SetPassColor(args[*pargi+1])
				if !ok {
					fmt.Fprintf(os.Stderr,
						"mlr: --pass-color argument unrecognized; got \"%s\".\n",
						args[*pargi+1])
					os.Exit(1)
				}
				*pargi += 2
			},
		},

		{
			name: "--fail-color",
			help: "Specify the color (see `--list-color-codes` and `--list-color-names`) for failing cases in `mlr regtest`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				ok := colorizer.SetFailColor(args[*pargi+1])
				if !ok {
					fmt.Fprintf(os.Stderr,
						"mlr: --fail-color argument unrecognized; got \"%s\".\n",
						args[*pargi+1])
					os.Exit(1)
				}
				*pargi += 2
			},
		},

		{
			name: "--help-color",
			help: "Specify the color (see `--list-color-codes` and `--list-color-names`) for highlights in `mlr help` output.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				ok := colorizer.SetHelpColor(args[*pargi+1])
				if !ok {
					fmt.Fprintf(os.Stderr,
						"mlr: --help-color argument unrecognized; got \"%s\".\n",
						args[*pargi+1])
					os.Exit(1)
				}
				*pargi += 2
			},
		},
	},
}

// ================================================================
// FLATTEN/UNFLATTEN FLAGS

func FlattenUnflattenPrintInfo() {
	fmt.Println("These flags control how Miller converts record values which are maps or arrays, when input is JSON and output is non-JSON (flattening) or input is non-JSON and output is JSON (unflattening).")
	fmt.Println()
	fmt.Println("See the flatten/unflatten doc page https://miller.readthedocs.io/en/latest/flatten-unflatten for more information.")
}

func init() { FlattenUnflattenFlagSection.Sort() }

var FlattenUnflattenFlagSection = FlagSection{
	name:        "Flatten-unflatten flags",
	infoPrinter: FlattenUnflattenPrintInfo,
	flags: []Flag{

		{
			name:     "--flatsep",
			altNames: []string{"--jflatsep"},
			arg:      "{string}",
			help:     "Separator for flattening multi-level JSON keys, e.g. `{\"a\":{\"b\":3}}` becomes `a:b => 3` for non-JSON formats. Defaults to `" + DEFAULT_JSON_FLATTEN_SEPARATOR + "`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.FLATSEP = SeparatorFromArg(args[*pargi+1])
				*pargi += 2
			},
		},

		{
			name: "--no-auto-flatten",
			help: "When output is non-JSON, suppress the default auto-flatten behavior. Default: if `$y = [7,8,9]` then this flattens to `y.1=7,y.2=8,y.3=9`, and similarly for maps. With `--no-auto-flatten`, instead we get `$y=[1, 2, 3]`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.AutoFlatten = false
				*pargi += 1
			},
		},

		{
			name: "--no-auto-unflatten",
			help: "When input is non-JSON and output is JSON, suppress the default auto-unflatten behavior. Default: if the input has `y.1=7,y.2=8,y.3=9` then this unflattens to `$y=[7,8,9]`.  With `--no-auto-flatten`, instead we get `${y.1}=7,${y.2}=8,${y.3}=9`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.AutoUnflatten = false
				*pargi += 1
			},
		},
	},
}

// ================================================================
// PROFILING FLAGS

func ProfilingPrintInfo() {
	fmt.Print("These are flags for profiling Miller performance.")
}

func init() { ProfilingFlagSection.Sort() }

var ProfilingFlagSection = FlagSection{
	name:        "Profiling flags",
	infoPrinter: ProfilingPrintInfo,
	flags: []Flag{
		{
			name: "--cpuprofile",
			arg:  "{CPU-profile file name}",
			help: `Create a CPU-profile file for performance analysis. Instructions will be printed to stderr.
This flag must be the very first thing after 'mlr' on the command line.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				// Already handled in main(). Nothing to do here except to accept this as valid syntax.
				*pargi += 2
			},
		},

		{
			name: "--traceprofile",
			help: `Create a trace-profile file for performance analysis. Instructions will be printed to stderr.
This flag must be the very first thing after 'mlr' on the command line.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				// Already handled in main(). Nothing to do here except to accept this as valid syntax.
				*pargi += 1
			},
		},

		{
			name: "--time",
			help: "Print elapsed execution time in seconds to stderr at the end of the execution of the program.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.PrintElapsedTime = true
				*pargi += 1
			},
		},
	},
}

// ================================================================
// MISC FLAGS

func MiscPrintInfo() {
	fmt.Print("These are flags which don't fit into any other category.")
}

func init() { MiscFlagSection.Sort() }

var MiscFlagSection = FlagSection{
	name:        "Miscellaneous flags",
	infoPrinter: MiscPrintInfo,
	flags: []Flag{

		{
			name: "-x",
			help: "If any record has an error value in it, report it and stop the process. The default is to print the field value as `(error)` and continue.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.FailOnDataError = true
				*pargi += 1
			},
		},

		{
			name: "-n",
			help: "Process no input files, nor standard input either. Useful for `mlr put` with `begin`/`end` statements only. (Same as `--from /dev/null`.) Also useful in `mlr -n put -v '...'` for analyzing abstract syntax trees (if that's your thing).",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.NoInput = true
				*pargi += 1
			},
		},

		{
			name: "-I",
			help: "Process files in-place. For each file name on the command line, output is written to a temp file in the same directory, which is then renamed over the original. Each file is processed in isolation: if the output format is CSV, CSV headers will be present in each output file, statistics are only over each file's own records; and so on.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.DoInPlace = true
				*pargi += 1
			},
		},

		{
			name: "--from",
			arg:  "{filename}",
			help: "Use this to specify an input file before the verb(s), rather than after. May be used more than once. Example: `mlr --from a.dat --from b.dat cat` is the same as `mlr cat a.dat b.dat`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.FileNames = append(options.FileNames, args[*pargi+1])
				*pargi += 2
			},
		},

		{
			name: "--mfrom",
			arg:  "{filenames}",
			help: "Use this to specify one of more input files before the verb(s), rather than after. May be used more than once.  The list of filename must end with `--`. This is useful for example since `--from *.csv` doesn't do what you might hope but `--mfrom *.csv --` does.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				*pargi += 1
				for *pargi < argc && args[*pargi] != "--" {
					options.FileNames = append(options.FileNames, args[*pargi])
					*pargi += 1
				}
				if *pargi >= argc {
					fmt.Fprintf(os.Stderr, "mlr: \"--mfrom\" must be terminated by \"--\".\n")
					os.Exit(1)
				}
				if args[*pargi] == "--" {
					*pargi += 1
				}
			},
		},

		{
			name: "--files",
			arg:  "{filename}",
			help: "Use this to specify a file which itself contains, one per line, names of input files. May be used more than once.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)

				fileName := args[*pargi+1]
				handle, err := os.Open(fileName)
				if err != nil {
					/// XXXX return false
					fmt.Fprintln(os.Stderr, "mlr", err)
					os.Exit(1)
				}
				defer handle.Close()

				lineReader := bufio.NewReader(handle)

				eof := false
				lineno := 0
				for !eof {
					line, err := lineReader.ReadString('\n')
					if err == io.EOF {
						err = nil
						eof = true
						break
					}
					lineno++

					if err != nil {
						fmt.Fprintln(os.Stderr, "mlr", err)
						os.Exit(1)
					}

					// This is how to do a chomp:
					// TODO: handle \r\n with libified solution.
					line = strings.TrimRight(line, "\n")

					options.FileNames = append(options.FileNames, line)
				}

				*pargi += 2
			},
		},

		{
			name: "--ofmt",
			arg:  "{format}",
			help: "E.g. `%.18f`, `%.0f`, `%9.6e`. Please use sprintf-style codes (https://pkg.go.dev/fmt) for floating-point numbers. If not specified, default formatting is used.  See also the `fmtnum` function and the `format-values` verb.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.FPOFMT = args[*pargi+1]
				*pargi += 2
			},
		},

		{
			name: "--ofmte",
			arg:  "{n}",
			help: "Use --ofmte 6 as shorthand for --ofmt %.6e, etc.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.FPOFMT = "%." + args[*pargi+1] + "e"
				*pargi += 2
			},
		},

		{
			name: "--ofmtf",
			arg:  "{n}",
			help: "Use --ofmtf 6 as shorthand for --ofmt %.6f, etc.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.FPOFMT = "%." + args[*pargi+1] + "f"
				*pargi += 2
			},
		},

		{
			name: "--ofmtg",
			arg:  "{n}",
			help: "Use --ofmtg 6 as shorthand for --ofmt %.6g, etc.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.WriterOptions.FPOFMT = "%." + args[*pargi+1] + "g"
				*pargi += 2
			},
		},

		{
			name: "--load",
			arg:  "{filename}",
			help: "Load DSL script file for all put/filter operations on the command line.  If the name following `--load` is a directory, load all `*.mlr` files in that directory. This is just like `put -f` and `filter -f` except it's up-front on the command line, so you can do something like `alias mlr='mlr --load ~/myscripts'` if you like.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				options.DSLPreloadFileNames = append(options.DSLPreloadFileNames, args[*pargi+1])
				*pargi += 2
			},
		},

		{
			name: "--mload",
			arg:  "{filenames}",
			help: "Like `--load` but works with more than one filename, e.g. `--mload *.mlr --`.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				*pargi += 1
				for *pargi < argc && args[*pargi] != "--" {
					options.DSLPreloadFileNames = append(options.DSLPreloadFileNames, args[*pargi])
					*pargi += 1
				}
				if args[*pargi] == "--" {
					*pargi += 1
				}
			},
		},

		{
			name: "--tz",
			arg:  "{timezone}",
			help: "Specify timezone, overriding `$TZ` environment variable (if any).",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				os.Setenv("TZ", args[*pargi+1])
				*pargi += 2
			},
		},

		{
			name: "--nr-progress-mod",
			arg:  "{m}",
			help: "With m a positive integer: print filename and record count to os.Stderr every m input records.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				nrProgressMod, ok := lib.TryIntFromString(args[*pargi+1])
				if !ok || nrProgressMod <= 0 {
					fmt.Fprintf(os.Stderr,
						"%s: --nr-progress-mod argument must be a positive integer; got \"%s\".\n",
						"mlr", args[*pargi+1])
					os.Exit(1)
				}
				options.NRProgressMod = nrProgressMod
				*pargi += 2
			},
		},

		{
			name: "--seed",
			arg:  "{n}",
			help: "with `n` of the form `12345678` or `0xcafefeed`. For `put`/`filter` `urand`, `urandint`, and `urand32`.",

			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				randSeed, ok := lib.TryIntFromString(args[*pargi+1])
				if ok {
					options.RandSeed = randSeed
					options.HaveRandSeed = true
				} else {
					fmt.Fprintf(os.Stderr,
						"mlr: --seed argument must be a decimal or hexadecimal integer; got \"%s\".\n",
						args[*pargi+1])
					fmt.Fprintf(os.Stderr, "Please run \"mlr --help\" for detailed usage information.\n")
					os.Exit(1)
				}
				*pargi += 2
			},
		},

		{
			name: "--no-dedupe-field-names",
			help: `By default, if an input record has a field named ` + "`x`" + ` and
another also named ` + "`x`" + `, the second will be renamed ` + "`x_2`" + `, and so on.  With this flag provided, the
second ` + "`x`" + `'s value will replace the first ` + "`x`" + `'s value when the record is read.  This flag has no effect
on JSON input records, where duplicate keys always result in the last one's value being retained.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.ReaderOptions.DedupeFieldNames = false
				*pargi += 1
			},
		},

		{
			name: "--records-per-batch",
			arg:  "{n}",
			help: "This is an internal parameter for maximum number of records in a batch size. Normally this does not\n" +
				"need to be modified, except when input is from `tail -f`. See also\n" +
				"https://miller.readthedocs.io/en/latest/reference-main-flag-list/.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				CheckArgCount(args, *pargi, argc, 2)
				recordsPerBatch, ok := lib.TryIntFromString(args[*pargi+1])
				if !ok || recordsPerBatch <= 0 {
					fmt.Fprintf(os.Stderr,
						"%s: --records-per-batch argument must be a positive integer; got \"%s\".\n",
						"mlr", args[*pargi+1])
					os.Exit(1)
				}
				options.ReaderOptions.RecordsPerBatch = recordsPerBatch
				*pargi += 2
			},
		},

		{
			name: "--hash-records",
			help: `This is an internal parameter which normally does not need to be modified.
It controls the mechanism by which Miller accesses fields within records.
In general --no-hash-records is faster, and is the default. For specific use-cases involving
data having many fields, and many of them being processed during a given processing run,
--hash-records might offer a slight performance benefit.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				mlrval.HashRecords(true)
				*pargi += 1
			},
		},

		{
			name: "--no-hash-records",
			help: `See --hash-records.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				mlrval.HashRecords(false)
				*pargi += 1
			},
		},

		{
			name:     "--infer-none",
			altNames: []string{"-S"},
			help:     `Don't treat values like 123 or 456.7 in data files as int/float; leave them as strings.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				mlrval.SetInferrerStringOnly()
				*pargi += 1
			},
		},

		{
			name:     "--infer-int-as-float",
			altNames: []string{"-A"},
			help:     `Cast all integers in data files to floats.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				mlrval.SetInferrerIntAsFloat()
				*pargi += 1
			},
		},

		{
			name:     "--infer-octal",
			altNames: []string{"-O"},
			help: `Treat numbers like 0123 in data files as numeric; default is string.
Note that 00--07 etc scan as int; 08-09 scan as float.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				mlrval.SetInferrerOctalAsInt()
				*pargi += 1
			},
		},

		{
			name: "--fflush",
			help: `Force buffered output to be written after every output record.
The default is flush output after every record if the output is to the terminal, or less often if
the output is to a file or a pipe. The default is a significant performance optimization for large
files.  Use this flag to force frequent updates even when output is to a pipe or file, at a
performance cost.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.FlushOnEveryRecord = true
				options.WriterOptions.flushOnEveryRecordWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "--no-fflush",
			help: `Let buffered output not be written after every output record.
The default is flush output after every record if the output is to the terminal, or less often if
the output is to a file or a pipe. The default is a significant performance optimization for large
files.  Use this flag to allow less-frequent updates when output is to the terminal. This is
unlikely to be a noticeable performance improvement, since direct-to-screen output for large files
has its own overhead.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				options.WriterOptions.FlushOnEveryRecord = false
				options.WriterOptions.flushOnEveryRecordWasSpecified = true
				*pargi += 1
			},
		},

		{
			name: "-s",
			arg:  "{file name}",
			help: `Take command-line flags from file name. For more information please see ` +
				lib.DOC_URL + `/en/latest/scripting/.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				// Already handled in main(). Nothing to do here except to accept this as valid syntax.
				*pargi += 2
			},
		},

		{
			name: "--s-no-comment-strip",
			arg:  "{file name}",
			help: `Take command-line flags from file name, like -s, but with no comment-stripping. For more information please see ` +
				lib.DOC_URL + `/en/latest/scripting/.`,
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				// Already handled in main(). Nothing to do here except to accept this as valid syntax.
				*pargi += 2
			},
		},

		{
			name: "--norc",
			help: "Do not load a .mlrrc file.",
			parser: func(args []string, argc int, pargi *int, options *TOptions) {
				*pargi += 1
			},
		},
	},
}