summaryrefslogtreecommitdiff
path: root/Command/Help.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/Help.hs')
-rw-r--r--Command/Help.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/Command/Help.hs b/Command/Help.hs
index c77f739c1..71e767663 100644
--- a/Command/Help.hs
+++ b/Command/Help.hs
@@ -23,20 +23,24 @@ import GitAnnex.Options
import System.Console.GetOpt
def :: [Command]
-def = [noCommit $ noRepo showGeneralHelp $ dontCheck repoExists $
+def = [noCommit $ noRepo startNoRepo $ dontCheck repoExists $
command "help" paramNothing seek SectionQuery "display help"]
seek :: [CommandSeek]
seek = [withWords start]
start :: [String] -> CommandStart
-start ["options"] = do
- liftIO showCommonOptions
- stop
-start _ = do
- liftIO showGeneralHelp
+start params = do
+ liftIO $ start' params
stop
+startNoRepo :: CmdParams -> IO ()
+startNoRepo = start'
+
+start' :: [String] -> IO ()
+start' ["options"] = showCommonOptions
+start' _ = showGeneralHelp
+
showCommonOptions :: IO ()
showCommonOptions = putStrLn $ usageInfo "Common options:" options