From dbe039a17b3e3ffa6f90c974f758a0b830f9fdba Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 15 Apr 2016 17:21:57 -0400 Subject: Removed "working-key" command. --- kiki.hs | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/kiki.hs b/kiki.hs index 2fc960d..1be5b92 100644 --- a/kiki.hs +++ b/kiki.hs @@ -509,7 +509,8 @@ kiki_usage bExport bImport bSecret cmd = putStr $ ] ++ commonOptions ++ [" --working" ," Show fingerprints for the working key (which will be used to" - ," make signatures) and all its subkeys and UID." + ," make signatures) and all its subkeys and UID. This action is" + ," inferred when no options are supplied." ,"" ," --key SPEC" ," Show fingerprints for the specified key and all its subkeys" @@ -678,9 +679,9 @@ kiki_usage bExport bImport bSecret cmd = putStr $ ,"" ," (See 'kiki help spec' for more information.)" ,"" - ] ++ specifyingFiles + ] ++ specifyingFiles "spec" -> unlines keyspec - where + where commonOptions :: [String] commonOptions = [" --help" @@ -697,7 +698,7 @@ kiki_usage bExport bImport bSecret cmd = putStr $ ," given by the HOME environment variable. The option is named" ," or rather misnamed in a fashion similar to the gpg option with" ," exactly the same functionality." - ,""] ++ documentPassphraseFDFlag bExport bImport bSecret ++ showwk + ,""] ++ documentPassphraseFDFlag bExport bImport bSecret showwk :: [String] showwk = [" --show-wk" @@ -709,6 +710,7 @@ kiki_usage bExport bImport bSecret cmd = putStr $ syncflags = ["" ,"Flags:"] ++ commonOptions + ++ showwk ++ documentImportFlag bExport bImport bSecret ++ documentImportIfAuthenticFlag bExport bImport bSecret ++ documentAutoSignFlag bExport bImport bSecret @@ -1139,15 +1141,6 @@ kiki "export-secret" args_raw = kiki "export-public" args_raw = sync True False False "export-public" args_raw -kiki "working-key" args = do - if "--help" `notElem` args - then sync False False False "working-key" ["--show-wk"] - else putStrLn $ - unlines ["working-key" - ,"" - ," Displays the master key with its subkeys that will be" - ," used for making signatures"] - -- Generic help kiki "help" [] = do putStrLn "Valid commands are:" @@ -1167,6 +1160,7 @@ kiki "help" args = forM_ args $ \arg -> case lookup arg commands of Nothing -> putStrLn $ "No help available for commmand '" ++ arg ++ "'." _ -> kiki arg ["--help"] +kiki "show" [] = kiki "show" ["--working"] kiki "show" args = do let (sargs,margs) = processArgs sargspec polyVariadicArgs "--show" args sargspec = [ ("--working",0) --("--show-wk",0) @@ -1623,7 +1617,6 @@ commands = , ( "import-public", "import (public) information into your keyring" ) , ( "export-secret", "export (both public and secret) information into your keyring" ) , ( "export-public", "import (public) information into your keyring" ) - , ( "working-key", "show the current working master key and its subkeys" ) , ( "merge", "low level import/export operation" ) , ( "init-key", "initialize the samizdat key ring") , ( "delete", "Delete a subkey and its associated signatures" ) @@ -1646,7 +1639,7 @@ main = do args_raw <- getArgs case args_raw of - [] -> kiki "working-key" [] + [] -> kiki "show" ["--working"] cmd : args | cmd `elem` map fst commands -> kiki cmd args -- cgit v1.2.3