diff options
Diffstat (limited to 'CmdLine/GitAnnex/Options.hs')
-rw-r--r-- | CmdLine/GitAnnex/Options.hs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/CmdLine/GitAnnex/Options.hs b/CmdLine/GitAnnex/Options.hs index 1472a4d2b..160c01a3a 100644 --- a/CmdLine/GitAnnex/Options.hs +++ b/CmdLine/GitAnnex/Options.hs @@ -84,7 +84,7 @@ parseUnusedKeysOption = switch ) parseSpecificKeyOption :: Parser (Maybe Key) -parseSpecificKeyOption = finalOpt $ option (str >>= parseKey) +parseSpecificKeyOption = optional $ option (str >>= parseKey) ( long "key" <> help "operate on specified key" <> metavar paramKey @@ -201,9 +201,3 @@ parseAutoOption = switch {- Parser that accepts all non-option params. -} cmdParams :: CmdParamsDesc -> Parser CmdParams cmdParams paramdesc = many (argument str (metavar paramdesc)) - -{- Makes an option parser that is normally required be optional; - - - its switch can be given zero or more times, and the last one - - - given will be used. -} -finalOpt :: Parser a -> Parser (Maybe a) -finalOpt = lastMaybe <$$> many |