@@ -472,15 +472,69 @@ Specified arguments are separated by spaces. Arguments can be unquoted (if they
472
472
do not contain space or ` " ` characters) or quoted (` "" ` ). Quoted arguments can
473
473
include 'escaped' characters, escaped with an initial ` \ ` character.
474
474
475
+ Account may need to be taken of the shell's approach to the processing of
476
+ command line arguments. For example, to pass ` 'a single quoted string' ` :
477
+
478
+ === "Unix-like (Bash or Zsh)"
479
+
480
+ In Bash, or Zsh (if `RC_QUOTES` option not set):
481
+
482
+ `stack bench --benchmark-arguments \"\''a single quoted string'\'\"`
483
+
484
+ Outside of single quotes, `\"` escapes a double quote and `\'` escapes a
485
+ single quote. The content of single quotes is taken literally, but cannot
486
+ contain a single quote.
487
+
488
+ In Zsh (if `RC_QUOTES` option set):
489
+
490
+ `stack bench --benchmark-arguments '"''a single quoted string''"'`
491
+
492
+ The content of single quotes is taken literally. Within single quotes, `''`
493
+ escapes a single quote.
494
+
495
+ === "Windows (PowerShell)"
496
+
497
+ `stack bench --benchmark-arguments '"''a single quoted string''"'`
498
+
499
+ The content of single quotes is taken literally. Within single quotes, `''`
500
+ escapes a single quote.
501
+
475
502
### ` --exec ` option
476
503
477
- ` stack build --exec " <command> [<argument(s)>]" ` will run the specified command
504
+ ` stack build --exec ' <command> [<argument(s)>]' ` will run the specified command
478
505
after a successful build.
479
506
480
507
Specified arguments are separated by spaces. Arguments can be unquoted (if they
481
508
do not contain space or ` " ` characters) or quoted (` "" ` ). Quoted arguments can
482
509
include 'escaped' characters, escaped with an initial ` \ ` character.
483
510
511
+ Account may need to be taken of the shell's approach to the processing of
512
+ command line arguments. For example, to pass ` 'a single quoted string' ` :
513
+
514
+ === "Unix-like (Bash or Zsh)"
515
+
516
+ In Bash, or Zsh (if `RC_QUOTES` option not set):
517
+
518
+ `stack build --exec '<command> '\"\''a single quoted string'\'\"`
519
+
520
+ Outside of single quotes, `\"` escapes a double quote and `\'` escapes a
521
+ single quote. The content of single quotes is taken literally, but cannot
522
+ contain a single quote.
523
+
524
+ In Zsh (if `RC_QUOTES` option set):
525
+
526
+ `stack build --exec '<command> "''a single quoted string''"'`
527
+
528
+ The content of single quotes is taken literally. Within single quotes, `''`
529
+ escapes a single quote.
530
+
531
+ === "Windows (PowerShell)"
532
+
533
+ `stack build --exec '<command> "''a single quoted string''"'`
534
+
535
+ The content of single quotes is taken literally. Within single quotes, `''`
536
+ escapes a single quote.
537
+
484
538
### ` --test-arguments ` , ` --ta ` option
485
539
486
540
` stack build --test --test-arguments=<argument(s)> ` will pass the specified
@@ -491,6 +545,33 @@ Specified arguments are separated by spaces. Arguments can be unquoted (if they
491
545
do not contain space or ` " ` characters) or quoted (` "" ` ). Quoted arguments can
492
546
include 'escaped' characters, escaped with an initial ` \ ` character.
493
547
548
+ Account may need to be taken of the shell's approach to the processing of
549
+ command line arguments. For example, to pass ` 'a single quoted string' ` :
550
+
551
+ === "Unix-like (Bash or Zsh)"
552
+
553
+ In Bash, or Zsh (if `RC_QUOTES` option not set):
554
+
555
+ `stack test --test-arguments \"\''a single quoted string'\'\"`
556
+
557
+ Outside of single quotes, `\"` escapes a double quote and `\'` escapes a
558
+ single quote. The content of single quotes is taken literally, but cannot
559
+ contain a single quote.
560
+
561
+ In Zsh (if `RC_QUOTES` option set):
562
+
563
+ `stack bench --benchmark-arguments '"''a single quoted string''"'`
564
+
565
+ The content of single quotes is taken literally. Within single quotes, `''`
566
+ escapes a single quote.
567
+
568
+ === "Windows (PowerShell)"
569
+
570
+ `stack test --test-arguments '"''a single quoted string''"'`
571
+
572
+ The content of single quotes is taken literally. Within single quotes, `''`
573
+ escapes a single quote.
574
+
494
575
## Flags affecting GHC's behaviour
495
576
496
577
### ` --[no-]executable-profiling ` flag
0 commit comments