summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kiki.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/kiki.hs b/kiki.hs
index 2f8275d..2d926a8 100644
--- a/kiki.hs
+++ b/kiki.hs
@@ -1202,6 +1202,7 @@ kiki "merge" [] = do
1202 , " | --flow=(fill|spill|sync)[,(subkeys|match=SPEC)]" 1202 , " | --flow=(fill|spill|sync)[,(subkeys|match=SPEC)]"
1203 , " | --create=CMD" 1203 , " | --create=CMD"
1204 , " | --autosign[=no]" 1204 , " | --autosign[=no]"
1205 , " | --delete=FINGERPRINT"
1205 , " | --" 1206 , " | --"
1206 , " | FILE ) ..."] 1207 , " | FILE ) ..."]
1207kiki "merge" args | "--help" `elem` args = do 1208kiki "merge" args | "--help" `elem` args = do
@@ -1267,6 +1268,10 @@ kiki "merge" args = do
1267 ( flow 1268 ( flow
1268 , op { opFiles= Map.insert (ArgFile fname) flow (opFiles op) }) 1269 , op { opFiles= Map.insert (ArgFile fname) flow (opFiles op) })
1269 1270
1271 doDelete :: String -> StreamInfo -> KeyRingOperation -> (StreamInfo,KeyRingOperation)
1272 doDelete fp flow op = ( flow
1273 , op { opTransforms = opTransforms op ++ [DeleteSubKey fp] } )
1274
1270 doAutosign :: Bool -> StreamInfo -> KeyRingOperation -> (StreamInfo,KeyRingOperation) 1275 doAutosign :: Bool -> StreamInfo -> KeyRingOperation -> (StreamInfo,KeyRingOperation)
1271 doAutosign True flow op = 1276 doAutosign True flow op =
1272 if Map.null (opFiles op) 1277 if Map.null (opFiles op)
@@ -1295,6 +1300,7 @@ kiki "merge" args = do
1295 dispatch = 1300 dispatch =
1296 case parsed of 1301 case parsed of
1297 Right fname -> doFile flow op fname 1302 Right fname -> doFile flow op fname
1303 Left ("delete",Just fp) -> doDelete fp flow op
1298 Left ("autosign",Nothing) -> doAutosign True flow op 1304 Left ("autosign",Nothing) -> doAutosign True flow op
1299 Left ("autosign",Just "y") -> doAutosign True flow op 1305 Left ("autosign",Just "y") -> doAutosign True flow op
1300 Left ("autosign",Just "yes") -> doAutosign True flow op 1306 Left ("autosign",Just "yes") -> doAutosign True flow op