Skip to content

Commit f94ff6f

Browse files
bacchanaliamergify-bot
authored and
mergify-bot
committed
update docs for clarity
1 parent a2580fa commit f94ff6f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

doc/cabal-commands.rst

+8-7
Original file line numberDiff line numberDiff line change
@@ -436,13 +436,15 @@ See `the v2-build section <#cabal-v2-build>`__ for the target syntax.
436436

437437
When ``TARGET`` is one of the following:
438438

439-
- A component target: execute the specified executable, benchmark or test suite
439+
- A component target: execute the specified executable, benchmark or test suite.
440440

441441
- A package target:
442442
1. If the package has exactly one executable component, it will be selected.
443443
2. If the package has multiple executable components, an error is raised.
444444
3. If the package has exactly one test or benchmark component, it will be selected.
445-
4. Otherwise an issue is raised
445+
4. Otherwise an issue is raised.
446+
447+
- The path to a script: execute the script at the path.
446448

447449
- Empty target: Same as package target, implicitly using the package from the current
448450
working directory.
@@ -458,8 +460,8 @@ have to separate them with ``--``.
458460

459461
$ cabal v2-run target -- -a -bcd --argument
460462

461-
``v2-run`` also supports running script files that use a certain format. With
462-
a script that looks like:
463+
``v2-run`` supports running script files that use a certain format.
464+
Scripts look like:
463465

464466
::
465467

@@ -484,13 +486,12 @@ Only some fields are supported in the metadata blocks, and these fields are
484486
currently not validated. See
485487
`#8024 <https://github.com/haskell/cabal/issues/8024>`__ for details.
486488

487-
It can either be executed like any other script, using ``cabal`` as an
488-
interpreter, or through this command:
489+
A script can either be executed directly using `cabal` as an interpreter or
490+
with the command:
489491

490492
::
491493

492494
$ cabal v2-run path/to/script
493-
$ cabal v2-run path/to/script -- --arg1 # args are passed like this
494495

495496
The executable is cached under the cabal directory, and can be pre-built with
496497
``cabal v2-build path/to/script`` and the cache can be removed with

0 commit comments

Comments
 (0)