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.
This commit is contained in:
parent
b66a2d6c5b
commit
7af0893abd
6 changed files with 50 additions and 17 deletions
|
@ -39,13 +39,3 @@ instance DeferredParseClass [DeferredParse a] where
|
|||
|
||||
-- Use when the Annex action modifies Annex state.
|
||||
type GlobalSetter = DeferredParse ()
|
||||
|
||||
globalFlag :: Annex () -> Mod FlagFields GlobalSetter -> Parser GlobalSetter
|
||||
globalFlag setter = flag' (DeferredParse setter)
|
||||
|
||||
globalSetter :: (v -> Annex ()) -> Parser v -> Parser GlobalSetter
|
||||
globalSetter setter parser = DeferredParse . setter <$> parser
|
||||
|
||||
combineGlobalSetters :: [Parser GlobalSetter] -> Parser GlobalSetter
|
||||
combineGlobalSetters l = DeferredParse . sequence_ . map getParsed
|
||||
<$> many (foldl1 (<|>) l)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue