convert all commands to work with optparse-applicative
Still no options though.
This commit is contained in:
parent
3125da54f6
commit
6e5c1f8db3
99 changed files with 391 additions and 297 deletions
|
@ -38,13 +38,14 @@ import qualified Data.Map as M
|
|||
|
||||
cmd :: Command
|
||||
cmd = withOptions [sizeOption] $
|
||||
command "testremote" paramRemote seek SectionTesting
|
||||
"test transfers to/from a remote"
|
||||
command "testremote" SectionTesting
|
||||
"test transfers to/from a remote"
|
||||
paramRemote (withParams seek)
|
||||
|
||||
sizeOption :: Option
|
||||
sizeOption = fieldOption [] "size" paramSize "base key size (default 1MiB)"
|
||||
|
||||
seek :: CommandSeek
|
||||
seek :: CmdParams -> CommandSeek
|
||||
seek ps = do
|
||||
basesz <- fromInteger . fromMaybe (1024 * 1024)
|
||||
<$> getOptionField sizeOption (pure . getsize)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue