From e7e61fb6cbe5455ded9bb550a64121223c099fc2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 8 Jul 2015 15:08:02 -0400 Subject: convert all commands to work with optparse-applicative Still no options though. --- Command/AddUrl.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Command/AddUrl.hs') diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index f009ff388..45edca283 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -39,8 +39,8 @@ import qualified Utility.Quvi as Quvi cmd :: Command cmd = notBareRepo $ withOptions [fileOption, pathdepthOption, relaxedOption, rawOption] $ - command "addurl" (paramRepeating paramUrl) seek - SectionCommon "add urls to annex" + command "addurl" SectionCommon "add urls to annex" + (paramRepeating paramUrl) (withParams seek) fileOption :: Option fileOption = fieldOption [] "file" paramFile "specify what file the url is added to" @@ -54,7 +54,7 @@ relaxedOption = flagOption [] "relaxed" "skip size check" rawOption :: Option rawOption = flagOption [] "raw" "disable special handling for torrents, quvi, etc" -seek :: CommandSeek +seek :: CmdParams -> CommandSeek seek us = do optfile <- getOptionField fileOption return relaxed <- getOptionFlag relaxedOption -- cgit v1.2.3