From bc9b0307cf427ab8ca6532c2ae4e0086e7ad4a4a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 10 Jul 2015 02:18:08 -0400 Subject: improve global options display in --help Put them in the help of subcommands, not the main command. And, hide them from the synopsis, to avoid cluttering it. --- CmdLine/Option.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CmdLine/Option.hs') diff --git a/CmdLine/Option.hs b/CmdLine/Option.hs index d28c7a704..9cc7a1f4b 100644 --- a/CmdLine/Option.hs +++ b/CmdLine/Option.hs @@ -20,6 +20,7 @@ import System.Console.GetOpt import Common.Annex import CmdLine.Usage +import CmdLine.GlobalSetter import qualified Annex import Types.Messages import Types.DeferredParse @@ -30,30 +31,37 @@ commonGlobalOptions = [ globalFlag (setforce True) ( long "force" <> help "allow actions that may lose annexed data" + <> hidden ) , globalFlag (setfast True) ( long "fast" <> short 'F' <> help "avoid slow operations" + <> hidden ) , globalFlag (Annex.setOutput QuietOutput) ( long "quiet" <> short 'q' <> help "avoid verbose output" + <> hidden ) , globalFlag (Annex.setOutput NormalOutput) ( long "verbose" <> short 'v' <> help "allow verbose output (default)" + <> hidden ) , globalFlag setdebug ( long "debug" <> short 'd' <> help "show debug messages" + <> hidden ) , globalFlag unsetdebug ( long "no-debug" <> help "don't show debug messages" + <> hidden ) , globalSetter setforcebackend $ strOption ( long "backend" <> short 'b' <> metavar paramName <> help "specify key-value backend to use" + <> hidden ) ] where -- cgit v1.2.3