summaryrefslogtreecommitdiff
path: root/Command.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 13:49:46 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-10 13:49:46 -0400
commit00e37e72e06d3692ea2b5c77dfa6b0147a3b6d6d (patch)
treef957d1c627da125fa2c852cefe24f4b6d556d2f1 /Command.hs
parent94642d1b1907a379181e25e298910b9c09fd5adf (diff)
convert version command, and make --raw work when not in a git repo
Diffstat (limited to 'Command.hs')
-rw-r--r--Command.hs7
1 files changed, 1 insertions, 6 deletions
diff --git a/Command.hs b/Command.hs
index a9659b78f..bee63bb74 100644
--- a/Command.hs
+++ b/Command.hs
@@ -12,7 +12,6 @@ module Command (
noRepo,
noCommit,
noMessages,
- withOptions,
withGlobalOptions,
next,
stop,
@@ -43,7 +42,7 @@ import qualified Options.Applicative as O
{- Generates a normal Command -}
command :: String -> CommandSection -> String -> CmdParamsDesc -> (CmdParamsDesc -> CommandParser) -> Command
command name section desc paramdesc mkparser =
- Command [] commonChecks False False name paramdesc
+ Command commonChecks False False name paramdesc
section desc (mkparser paramdesc) Nothing
{- Simple option parser that takes all non-option params as-is. -}
@@ -76,10 +75,6 @@ noMessages c = c { cmdnomessages = True }
noRepo :: (String -> O.Parser (IO ())) -> Command -> Command
noRepo a c = c { cmdnorepo = Just (a (cmdparamdesc c)) }
-{- Adds options to a command. -}
-withOptions :: [Option] -> Command -> Command
-withOptions o c = c { cmdoptions = cmdoptions c ++ o }
-
{- Adds global options to a command's option parser, and modifies its seek
- option to first run actions for them.
-}