diff --git a/doc/build_command.md b/doc/build_command.md index 49c6a3b79d..09c3f3c44a 100644 --- a/doc/build_command.md +++ b/doc/build_command.md @@ -225,9 +225,13 @@ sets this flag. ### `--haddock-arguments` option -`stack haddock --haddock-arguments ` passes the specified +`stack haddock --haddock-arguments ` passes the specified arguments to the Haddock tool. +Specified arguments are separated by spaces. Arguments can be unquoted (if they +do not contain space or `"` characters) or quoted (`""`). Quoted arguments can +include 'escaped' characters, escaped with an initial `\` character. + ### `--[no-]haddock-deps` flag Default: Enabled (if building Haddock documnentation) @@ -336,11 +340,34 @@ project packages or from local dependencies). See also the `--file-watch` flag. ## Controlling what happens after building +### `--benchmark-arguments`, `--ba` option + +`stack build --bench --benchmark-arguments=` will pass the +specified argument, or arguments, to each benchmark when it is run. + +Specified arguments are separated by spaces. Arguments can be unquoted (if they +do not contain space or `"` characters) or quoted (`""`). Quoted arguments can +include 'escaped' characters, escaped with an initial `\` character. + ### `--exec` option -`stack build --exec " []"` will run the specified command +`stack build --exec " []"` will run the specified command after a successful build. +Specified arguments are separated by spaces. Arguments can be unquoted (if they +do not contain space or `"` characters) or quoted (`""`). Quoted arguments can +include 'escaped' characters, escaped with an initial `\` character. + +### `--test-arguments`, `--ta` option + +`stack build --test --test-arguments=` will pass the specified +argument, or arguments, to each test when it is run. This option can be +specified multiple times. + +Specified arguments are separated by spaces. Arguments can be unquoted (if they +do not contain space or `"` characters) or quoted (`""`). Quoted arguments can +include 'escaped' characters, escaped with an initial `\` character. + ## Flags affecting GHC's behaviour ### `--[no-]executable-profiling` flag diff --git a/doc/exec_command.md b/doc/exec_command.md index 8dfa6b527d..fae3fb259b 100644 --- a/doc/exec_command.md +++ b/doc/exec_command.md @@ -26,9 +26,15 @@ By default: `--cwd ` to execute the executable in the specified directory. The option `--package ` has no effect for the `stack exec` command. For -further information about its use, see the [`stack ghc` command](ghc_command.md) documentation or the [`stack runghc` command](runghc_command.md) documentation. +further information about its use, see the [`stack ghc` command](ghc_command.md) +documentation or the [`stack runghc` command](runghc_command.md) documentation. -Pass the option `--rts-option ` to specify a GHC RTS flag or option. +Pass the option `--rts-option ` to specify a GHC RTS flag or option. The option can be specified multiple times. All specified GHC RTS flags and options are added to the arguments for the specified executable between arguments `+RTS` and `-RTS`. + +Specified GHC RTS flags and options are separated by spaces. Items can be +unquoted (if they do not contain space or `"` characters) or quoted (`""`). +Quoted items can include 'escaped' characters, escaped with an initial `\` +character.