Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
8a7c8bf3
Commit
8a7c8bf3
authored
Jun 21, 2014
by
barmston
Browse files
Improve exec help output
parent
44d49765
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/Setup.hs
View file @
8a7c8bf3
...
...
@@ -1650,8 +1650,27 @@ defaultExecFlags = ExecFlags {
execCommand
::
CommandUI
ExecFlags
execCommand
=
CommandUI
{
commandName
=
"exec"
,
commandSynopsis
=
"Run a command with the cabal environment"
,
commandDescription
=
Nothing
,
commandSynopsis
=
"Execute a command in the context of the package"
,
commandDescription
=
Just
$
\
pname
->
"Execute the given command making the package's installed dependencies
\n
"
++
"available to GHC. When a sandbox is being used, this causes GHC to
\n
"
++
"use the sandbox package database as if it had been invoked directly
\n
"
++
"by cabal. If a sandbox is not being used, GHC is not affected.
\n\n
"
++
"Any cabal executable packages installed into either the user package
\n
"
++
"database or into the current package's sandbox (if there is a current
\n
"
++
"package and sandbox) are available on PATH.
\n\n
"
++
"Examples:
\n
"
++
" Install the executable package pandoc into a sandbox and run it:
\n
"
++
" "
++
pname
++
" sandbox init
\n
"
++
" "
++
pname
++
" install pandoc
\n
"
++
" "
++
pname
++
" exec pandoc foo.md
\n\n
"
++
" Install the executable package hlint into the user package database
\n
"
++
" and run it:
\n
"
++
" "
++
pname
++
" install --user hlint
\n
"
++
" "
++
pname
++
" exec hlint Foo.hs
\n\n
"
++
" Execute runghc on Foo.hs with runghc configured to use the
\n
"
++
" sandbox package database (if a sandbox is being used):
\n
"
++
" "
++
pname
++
" exec runghc Foo.hs
\n
"
,
commandUsage
=
\
pname
->
"Usage: "
++
pname
++
" exec [FLAGS] COMMAND [-- [ARGS...]]
\n\n
"
++
"Flags for exec:"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment