summaryrefslogtreecommitdiff
path: root/Types/Command.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Types/Command.hs')
-rw-r--r--Types/Command.hs18
1 files changed, 10 insertions, 8 deletions
diff --git a/Types/Command.hs b/Types/Command.hs
index 3cabf7318..b173b61c9 100644
--- a/Types/Command.hs
+++ b/Types/Command.hs
@@ -8,6 +8,7 @@
module Types.Command where
import Types
+import Types.Option
{- A command runs in these stages.
-
@@ -32,14 +33,15 @@ type CommandPerform = Annex (Maybe CommandCleanup)
type CommandCleanup = Annex Bool
{- A command is defined by specifying these things. -}
-data Command = Command {
- cmdnorepo :: Maybe (IO ()), -- an action to run when not in a repo
- cmdcheck :: [CommandCheck], -- check stage
- cmdname :: String,
- cmdparamdesc :: String, -- description of params for usage
- cmdseek :: [CommandSeek], -- seek stage
- cmddesc :: String -- description of command for usage
-}
+data Command = Command
+ { cmdoptions :: [Option] -- command-specific options
+ , cmdnorepo :: Maybe (IO ()) -- an action to run when not in a repo
+ , cmdcheck :: [CommandCheck] -- check stage
+ , cmdname :: String
+ , cmdparamdesc :: String -- description of params for usage
+ , cmdseek :: [CommandSeek] -- seek stage
+ , cmddesc :: String -- description of command for usage
+ }
{- CommandCheck functions can be compared using their unique id. -}
instance Eq CommandCheck where