diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-07-08 15:08:02 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-07-08 15:08:02 -0400 |
commit | e7e61fb6cbe5455ded9bb550a64121223c099fc2 (patch) | |
tree | 003a99697256ea516ad40f9fbdb854996b58c0cd /Command/TransferKey.hs | |
parent | 8879c96d157f06bbd2372064251676b7927ce38e (diff) |
convert all commands to work with optparse-applicative
Still no options though.
Diffstat (limited to 'Command/TransferKey.hs')
-rw-r--r-- | Command/TransferKey.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Command/TransferKey.hs b/Command/TransferKey.hs index 6da2e742b..de4568f3a 100644 --- a/Command/TransferKey.hs +++ b/Command/TransferKey.hs @@ -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 |