make usage less terrifying

Need to make `git annex help command` show the options for that command.
This commit is contained in:
Joey Hess 2013-03-25 12:41:57 -04:00
parent 3babb935d3
commit 0d72519ae0
4 changed files with 22 additions and 34 deletions

View file

@ -45,7 +45,7 @@ dispatch fuzzyok allargs allcmds commonoptions fields header getgitrepo = do
prepCommand cmd params
tryRun state' cmd $ [startup] ++ actions ++ [shutdown $ cmdnocommit cmd]
where
err msg = msg ++ "\n\n" ++ usage header allcmds commonoptions
err msg = msg ++ "\n\n" ++ usage header allcmds
cmd = Prelude.head cmds
(fuzzy, cmds, name, args) = findCmd fuzzyok allargs allcmds err
(flags, params) = getOptCmd args cmd commonoptions err