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
|
@ -16,9 +16,10 @@ import qualified Remote
|
|||
import Types.Remote
|
||||
|
||||
cmd :: Command
|
||||
cmd = withOptions transferKeyOptions $
|
||||
noCommit $ command "transferkey" paramKey seek SectionPlumbing
|
||||
cmd = withOptions transferKeyOptions $ noCommit $
|
||||
command "transferkey" SectionPlumbing
|
||||
"transfers a key from or to a remote"
|
||||
paramKey (withParams seek)
|
||||
|
||||
transferKeyOptions :: [Option]
|
||||
transferKeyOptions = fileOption : fromToOptions
|
||||
|
@ -26,7 +27,7 @@ transferKeyOptions = fileOption : fromToOptions
|
|||
fileOption :: Option
|
||||
fileOption = fieldOption [] "file" paramFile "the associated file"
|
||||
|
||||
seek :: CommandSeek
|
||||
seek :: CmdParams -> CommandSeek
|
||||
seek ps = do
|
||||
to <- getOptionField toOption Remote.byNameWithUUID
|
||||
from <- getOptionField fromOption Remote.byNameWithUUID
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue