aboutsummaryrefslogtreecommitdiff
path: root/Command/TransferKey.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Command/TransferKey.hs')
-rw-r--r--Command/TransferKey.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Command/TransferKey.hs b/Command/TransferKey.hs
index 41a207080..f3856eb2e 100644
--- a/Command/TransferKey.hs
+++ b/Command/TransferKey.hs
@@ -28,11 +28,12 @@ transferKeyOptions = fileOption : fromToOptions
fileOption :: Option
fileOption = Option.field [] "file" paramFile "the associated file"
-seek :: [CommandSeek]
-seek = [withField toOption Remote.byNameWithUUID $ \to ->
- withField fromOption Remote.byNameWithUUID $ \from ->
- withField fileOption return $ \file ->
- withKeys $ start to from file]
+seek :: CommandSeek
+seek ps = do
+ to <- getOptionField toOption Remote.byNameWithUUID
+ from <- getOptionField fromOption Remote.byNameWithUUID
+ file <- getOptionField fileOption return
+ withKeys (start to from file) ps
start :: Maybe Remote -> Maybe Remote -> AssociatedFile -> Key -> CommandStart
start to from file key =