summaryrefslogtreecommitdiff
path: root/Command/AddUrl.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 15:08:02 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-07-08 15:08:02 -0400
commite7e61fb6cbe5455ded9bb550a64121223c099fc2 (patch)
tree003a99697256ea516ad40f9fbdb854996b58c0cd /Command/AddUrl.hs
parent8879c96d157f06bbd2372064251676b7927ce38e (diff)
convert all commands to work with optparse-applicative
Still no options though.
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r--Command/AddUrl.hs6
1 files changed, 3 insertions, 3 deletions
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