Commit d90d3c26 authored by Duncan Coutts's avatar Duncan Coutts

Improve the cabal --help output

Put the general info message at the top and make the explanation of
installing a hackage package somewhat clearer.
parent 27618136
......@@ -98,16 +98,17 @@ globalCommand :: CommandUI GlobalFlags
globalCommand = CommandUI {
commandName = "",
commandSynopsis = "",
commandUsage = \_ ->
"This program is the command line interface "
++ "to the Haskell Cabal infrastructure.\n"
++ "See http://www.haskell.org/cabal/ for more information.\n",
commandDescription = Just $ \pname ->
"Typical step for installing Cabal packages:\n"
++ " " ++ pname ++ " install [PACKAGES]\n"
++ "\nOccasionally you need to update the list of available packages:\n"
++ " " ++ pname ++ " update\n"
++ "\nFor more information about a command, try '"
++ pname ++ " COMMAND --help'."
++ "\nThis program is the command line interface to the Haskell Cabal Infrastructure."
++ "\nSee http://www.haskell.org/cabal/ for more information.\n",
commandUsage = \_ -> [],
"For more information about a command use:\n"
++ " " ++ pname ++ " COMMAND --help\n\n"
++ "To install Cabal packages from hackage use:\n"
++ " " ++ pname ++ " install foo [--dry-run]\n\n"
++ "Occasionally you need to update the list of available packages:\n"
++ " " ++ pname ++ " update\n",
commandDefaultFlags = defaultGlobalFlags,
commandOptions = \showOrParseArgs ->
(case showOrParseArgs of ShowArgs -> take 2; ParseArgs -> id)
......@@ -405,7 +406,7 @@ installCommand = configureCommand {
Just desc -> desc pname ++ "\n"
Nothing -> ""
in original
++ "Examples: \n"
++ "Examples:\n"
++ " " ++ pname ++ " install "
++ " Package in the current directory\n"
++ " " ++ pname ++ " install foo "
......
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