aboutsummaryrefslogtreecommitdiff
path: root/CmdLine/Option.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 02:18:08 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 02:18:08 -0400
commitbc9b0307cf427ab8ca6532c2ae4e0086e7ad4a4a (patch)
tree43d0984a200cb6ca68335da30b2574650955e2a4 /CmdLine/Option.hs
parentccd76ebf641ad481e549da97c85f73101a3149fd (diff)
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.
Diffstat (limited to 'CmdLine/Option.hs')
-rw-r--r--CmdLine/Option.hs8
1 files changed, 8 insertions, 0 deletions
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