Commit 28d41af6 authored by Alexis Williams's avatar Alexis Williams

Add docs

[ci skip]
parent 5931289b
......@@ -419,6 +419,28 @@ have to separate them with ``--``.
$ cabal new-run target -- -a -bcd --argument
'new-run' also supports running script files that use a certain format. With
a script that looks like:
::
#!/usr/bin/env cabal
{- cabal:
build-depends: base ^>= 4.11
, shelly ^>= 1.8.1
-}
main :: IO ()
main = do
...
It can either be executed like any other script, using ``cabal`` as an
interpreter, or through this command:
::
$ cabal new-run script.hs
cabal new-freeze
----------------
......
-*-change-log-*-
2.4.0.0 (current development version)
* 'new-run' now allows the user to run scripts that use a special block
to define their requirements (as in the executable stanza) in place
of a target. This also allows the use of 'cabal' as an interpreter
in a shebang line.
* Add aliases for the "new-" commands that won't change when they
lose their prefix or are eventually replaced by a third UI
paradigm in the future. (#5429)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment