@@ -60,6 +60,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
60
60
. long ( "show-all" )
61
61
. alias ( "show-nonprintable" )
62
62
. short ( 'A' )
63
+ . action ( ArgAction :: SetTrue )
63
64
. conflicts_with ( "language" )
64
65
. help ( "Show non-printable characters (space, tab, newline, ..)." )
65
66
. long_help (
@@ -137,6 +138,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
137
138
Arg :: new ( "diff" )
138
139
. long ( "diff" )
139
140
. short ( 'd' )
141
+ . action ( ArgAction :: SetTrue )
140
142
. conflicts_with ( "line-range" )
141
143
. help ( "Only show lines that have been added/removed/modified." )
142
144
. long_help (
@@ -229,6 +231,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
229
231
. long ( "number" )
230
232
. overrides_with ( "number" )
231
233
. short ( 'n' )
234
+ . action ( ArgAction :: SetTrue )
232
235
. help ( "Show line numbers (alias for '--style=numbers')." )
233
236
. long_help (
234
237
"Only show line numbers, no other decorations. This is an alias for \
@@ -283,6 +286,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
283
286
Arg :: new ( "force-colorization" )
284
287
. long ( "force-colorization" )
285
288
. short ( 'f' )
289
+ . action ( ArgAction :: SetTrue )
286
290
. conflicts_with ( "color" )
287
291
. conflicts_with ( "decorations" )
288
292
. overrides_with ( "force-colorization" )
@@ -314,6 +318,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
314
318
. short ( 'P' )
315
319
. long ( "no-paging" )
316
320
. alias ( "no-pager" )
321
+ . action ( ArgAction :: SetTrue )
317
322
. overrides_with ( "no-paging" )
318
323
. hide ( true )
319
324
. hide_short_help ( true )
@@ -379,6 +384,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
379
384
. arg (
380
385
Arg :: new ( "list-themes" )
381
386
. long ( "list-themes" )
387
+ . action ( ArgAction :: SetTrue )
382
388
. help ( "Display all supported highlighting themes." )
383
389
. long_help ( "Display a list of supported themes for syntax highlighting." ) ,
384
390
)
@@ -469,6 +475,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
469
475
Arg :: new ( "list-languages" )
470
476
. long ( "list-languages" )
471
477
. short ( 'L' )
478
+ . action ( ArgAction :: SetTrue )
472
479
. conflicts_with ( "list-themes" )
473
480
. help ( "Display all supported languages." )
474
481
. long_help ( "Display a list of supported languages for syntax highlighting." ) ,
@@ -493,12 +500,14 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
493
500
. arg (
494
501
Arg :: new ( "no-custom-assets" )
495
502
. long ( "no-custom-assets" )
503
+ . action ( ArgAction :: SetTrue )
496
504
. hide ( true )
497
505
. help ( "Do not load custom assets" ) ,
498
506
)
499
507
. arg (
500
508
Arg :: new ( "config-file" )
501
509
. long ( "config-file" )
510
+ . action ( ArgAction :: SetTrue )
502
511
. conflicts_with ( "list-languages" )
503
512
. conflicts_with ( "list-themes" )
504
513
. hide ( true )
@@ -507,6 +516,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
507
516
. arg (
508
517
Arg :: new ( "generate-config-file" )
509
518
. long ( "generate-config-file" )
519
+ . action ( ArgAction :: SetTrue )
510
520
. conflicts_with ( "list-languages" )
511
521
. conflicts_with ( "list-themes" )
512
522
. hide ( true )
@@ -515,25 +525,29 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
515
525
. arg (
516
526
Arg :: new ( "config-dir" )
517
527
. long ( "config-dir" )
528
+ . action ( ArgAction :: SetTrue )
518
529
. hide ( true )
519
530
. help ( "Show bat's configuration directory." ) ,
520
531
)
521
532
. arg (
522
533
Arg :: new ( "cache-dir" )
523
534
. long ( "cache-dir" )
535
+ . action ( ArgAction :: SetTrue )
524
536
. hide ( true )
525
537
. help ( "Show bat's cache directory." ) ,
526
538
)
527
539
. arg (
528
540
Arg :: new ( "diagnostic" )
529
541
. long ( "diagnostic" )
530
542
. alias ( "diagnostics" )
543
+ . action ( ArgAction :: SetTrue )
531
544
. hide_short_help ( true )
532
545
. help ( "Show diagnostic information for bug reports." )
533
546
)
534
547
. arg (
535
548
Arg :: new ( "acknowledgements" )
536
549
. long ( "acknowledgements" )
550
+ . action ( ArgAction :: SetTrue )
537
551
. hide_short_help ( true )
538
552
. help ( "Show acknowledgements." ) ,
539
553
)
@@ -551,6 +565,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
551
565
Arg :: new ( "build" )
552
566
. long ( "build" )
553
567
. short ( 'b' )
568
+ . action ( ArgAction :: SetTrue )
554
569
. help ( "Initialize (or update) the syntax/theme cache." )
555
570
. long_help (
556
571
"Initialize (or update) the syntax/theme cache by loading from \
@@ -561,6 +576,7 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
561
576
Arg :: new ( "clear" )
562
577
. long ( "clear" )
563
578
. short ( 'c' )
579
+ . action ( ArgAction :: SetTrue )
564
580
. help ( "Remove the cached syntax definitions and themes." ) ,
565
581
)
566
582
. group (
@@ -586,13 +602,20 @@ pub fn build_app(interactive_output: bool) -> Command<'static> {
586
602
"Use a different directory to store the cached syntax and theme set." ,
587
603
) ,
588
604
)
589
- . arg ( Arg :: new ( "blank" ) . long ( "blank" ) . requires ( "build" ) . help (
590
- "Create completely new syntax and theme sets \
605
+ . arg (
606
+ Arg :: new ( "blank" )
607
+ . long ( "blank" )
608
+ . action ( ArgAction :: SetTrue )
609
+ . requires ( "build" )
610
+ . help (
611
+ "Create completely new syntax and theme sets \
591
612
(instead of appending to the default sets).",
592
- ) )
613
+ ) ,
614
+ )
593
615
. arg (
594
616
Arg :: new ( "acknowledgements" )
595
617
. long ( "acknowledgements" )
618
+ . action ( ArgAction :: SetTrue )
596
619
. requires ( "build" )
597
620
. help ( "Build acknowledgements.bin." ) ,
598
621
) ,
0 commit comments