diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-25 15:49:52 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-25 15:49:52 -0400 |
commit | 3f0de706dd37f6b50db224bef19139eb780afef0 (patch) | |
tree | 51c29b4a64ffd2faddab23377641d8db28da3573 | |
parent | 1f3088fb945bbe241e5309a961a5b2df0fa9f93a (diff) |
comments
-rw-r--r-- | Commands.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Commands.hs b/Commands.hs index cda34d1bd..9c35c22e1 100644 --- a/Commands.hs +++ b/Commands.hs @@ -59,14 +59,16 @@ doSubCmd cmdname start param = do else showEndFail +{- A subcommand can broadly want one of several kinds of input parameters. + - This allows a first stage of filtering before starting a subcommand. -} data SubCmdWants = FilesInGit | FilesNotInGit | FilesMissing | Description + data SubCommand = Command { subcmdname :: String, subcmdaction :: SubCmdStart, subcmdwants :: SubCmdWants, subcmddesc :: String } - subCmds :: [SubCommand] subCmds = [ (Command "add" addStart FilesNotInGit @@ -108,6 +110,7 @@ options = [ header = "Usage: git-annex " ++ (join "|" $ map subcmdname subCmds) +{- Usage message with lists of options and subcommands. -} usage :: String usage = usageInfo header options ++ "\nSubcommands:\n" ++ cmddescs where |