Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal On branch : master
http://hackage.haskell.org/trac/ghc/changeset/a86be43fcfc926a866c63bfb6f00dc3a9d97a878 >--------------------------------------------------------------- commit a86be43fcfc926a866c63bfb6f00dc3a9d97a878 Author: Duncan Coutts <[email protected]> Date: Tue Jan 13 16:14:26 2009 +0000 Display examples in cabal install --help Examples: cabal install Package in the current directory cabal install foo Package from the hackage server cabal install foo-1.0 Specific version of a package cabal install 'foo < 2' Constrained package version >--------------------------------------------------------------- cabal-install/Distribution/Client/Setup.hs | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/cabal-install/Distribution/Client/Setup.hs b/cabal-install/Distribution/Client/Setup.hs index a47681a..3f5940d 100644 --- a/cabal-install/Distribution/Client/Setup.hs +++ b/cabal-install/Distribution/Client/Setup.hs @@ -400,6 +400,20 @@ installCommand = configureCommand { commandName = "install", commandSynopsis = "Installs a list of packages.", commandUsage = usagePackages "install", + commandDescription = Just $ \pname -> + let original = case commandDescription configureCommand of + Just desc -> desc pname ++ "\n" + Nothing -> "" + in original + ++ "Examples: \n" + ++ " " ++ pname ++ " install " + ++ " Package in the current directory\n" + ++ " " ++ pname ++ " install foo " + ++ " Package from the hackage server\n" + ++ " " ++ pname ++ " install foo-1.0 " + ++ " Specific version of a package\n" + ++ " " ++ pname ++ " install 'foo < 2' " + ++ " Constrained package version\n", commandDefaultFlags = (mempty, mempty), commandOptions = \showOrParseArgs -> liftOptionsFst (commandOptions configureCommand showOrParseArgs) ++ _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
