[commit: Cabal] master: Improve the cabal --help output (c8a8e59)
Ian Lynagh
igloo at earth.li
Fri Jun 24 02:01:33 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/c8a8e59705925c937e9f1380eca83a1089385a78
>---------------------------------------------------------------
commit c8a8e59705925c937e9f1380eca83a1089385a78
Author: Duncan Coutts <duncan at haskell.org>
Date: Tue Jan 13 19:20:58 2009 +0000
Improve the cabal --help output
Put the general info message at the top and make the explanation of
installing a hackage package somewhat clearer.
>---------------------------------------------------------------
cabal-install/Distribution/Client/Setup.hs | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/cabal-install/Distribution/Client/Setup.hs b/cabal-install/Distribution/Client/Setup.hs
index 3f5940d..0757bab 100644
--- a/cabal-install/Distribution/Client/Setup.hs
+++ b/cabal-install/Distribution/Client/Setup.hs
@@ -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 "
More information about the Cvs-libraries
mailing list