diff options
author | joe <joe@jerkface.net> | 2016-04-15 17:21:57 -0400 |
---|---|---|
committer | joe <joe@jerkface.net> | 2016-04-15 17:21:57 -0400 |
commit | dbe039a17b3e3ffa6f90c974f758a0b830f9fdba (patch) | |
tree | ebf92c7d13fca58cc95d70dfb6e64f603fadfd67 | |
parent | 5d3f7ae1b261adf00e78792e0e0113e6598adb01 (diff) |
Removed "working-key" command.
-rw-r--r-- | kiki.hs | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -509,7 +509,8 @@ kiki_usage bExport bImport bSecret cmd = putStr $ | |||
509 | ] ++ commonOptions ++ | 509 | ] ++ commonOptions ++ |
510 | [" --working" | 510 | [" --working" |
511 | ," Show fingerprints for the working key (which will be used to" | 511 | ," Show fingerprints for the working key (which will be used to" |
512 | ," make signatures) and all its subkeys and UID." | 512 | ," make signatures) and all its subkeys and UID. This action is" |
513 | ," inferred when no options are supplied." | ||
513 | ,"" | 514 | ,"" |
514 | ," --key SPEC" | 515 | ," --key SPEC" |
515 | ," Show fingerprints for the specified key and all its subkeys" | 516 | ," Show fingerprints for the specified key and all its subkeys" |
@@ -678,9 +679,9 @@ kiki_usage bExport bImport bSecret cmd = putStr $ | |||
678 | ,"" | 679 | ,"" |
679 | ," (See 'kiki help spec' for more information.)" | 680 | ," (See 'kiki help spec' for more information.)" |
680 | ,"" | 681 | ,"" |
681 | ] ++ specifyingFiles | 682 | ] ++ specifyingFiles |
682 | "spec" -> unlines keyspec | 683 | "spec" -> unlines keyspec |
683 | where | 684 | where |
684 | commonOptions :: [String] | 685 | commonOptions :: [String] |
685 | commonOptions = | 686 | commonOptions = |
686 | [" --help" | 687 | [" --help" |
@@ -697,7 +698,7 @@ kiki_usage bExport bImport bSecret cmd = putStr $ | |||
697 | ," given by the HOME environment variable. The option is named" | 698 | ," given by the HOME environment variable. The option is named" |
698 | ," or rather misnamed in a fashion similar to the gpg option with" | 699 | ," or rather misnamed in a fashion similar to the gpg option with" |
699 | ," exactly the same functionality." | 700 | ," exactly the same functionality." |
700 | ,""] ++ documentPassphraseFDFlag bExport bImport bSecret ++ showwk | 701 | ,""] ++ documentPassphraseFDFlag bExport bImport bSecret |
701 | showwk :: [String] | 702 | showwk :: [String] |
702 | showwk = | 703 | showwk = |
703 | [" --show-wk" | 704 | [" --show-wk" |
@@ -709,6 +710,7 @@ kiki_usage bExport bImport bSecret cmd = putStr $ | |||
709 | syncflags = | 710 | syncflags = |
710 | ["" | 711 | ["" |
711 | ,"Flags:"] ++ commonOptions | 712 | ,"Flags:"] ++ commonOptions |
713 | ++ showwk | ||
712 | ++ documentImportFlag bExport bImport bSecret | 714 | ++ documentImportFlag bExport bImport bSecret |
713 | ++ documentImportIfAuthenticFlag bExport bImport bSecret | 715 | ++ documentImportIfAuthenticFlag bExport bImport bSecret |
714 | ++ documentAutoSignFlag bExport bImport bSecret | 716 | ++ documentAutoSignFlag bExport bImport bSecret |
@@ -1139,15 +1141,6 @@ kiki "export-secret" args_raw = | |||
1139 | kiki "export-public" args_raw = | 1141 | kiki "export-public" args_raw = |
1140 | sync True False False "export-public" args_raw | 1142 | sync True False False "export-public" args_raw |
1141 | 1143 | ||
1142 | kiki "working-key" args = do | ||
1143 | if "--help" `notElem` args | ||
1144 | then sync False False False "working-key" ["--show-wk"] | ||
1145 | else putStrLn $ | ||
1146 | unlines ["working-key" | ||
1147 | ,"" | ||
1148 | ," Displays the master key with its subkeys that will be" | ||
1149 | ," used for making signatures"] | ||
1150 | |||
1151 | -- Generic help | 1144 | -- Generic help |
1152 | kiki "help" [] = do | 1145 | kiki "help" [] = do |
1153 | putStrLn "Valid commands are:" | 1146 | putStrLn "Valid commands are:" |
@@ -1167,6 +1160,7 @@ kiki "help" args = forM_ args $ \arg -> case lookup arg commands of | |||
1167 | Nothing -> putStrLn $ "No help available for commmand '" ++ arg ++ "'." | 1160 | Nothing -> putStrLn $ "No help available for commmand '" ++ arg ++ "'." |
1168 | _ -> kiki arg ["--help"] | 1161 | _ -> kiki arg ["--help"] |
1169 | 1162 | ||
1163 | kiki "show" [] = kiki "show" ["--working"] | ||
1170 | kiki "show" args = do | 1164 | kiki "show" args = do |
1171 | let (sargs,margs) = processArgs sargspec polyVariadicArgs "--show" args | 1165 | let (sargs,margs) = processArgs sargspec polyVariadicArgs "--show" args |
1172 | sargspec = [ ("--working",0) --("--show-wk",0) | 1166 | sargspec = [ ("--working",0) --("--show-wk",0) |
@@ -1623,7 +1617,6 @@ commands = | |||
1623 | , ( "import-public", "import (public) information into your keyring" ) | 1617 | , ( "import-public", "import (public) information into your keyring" ) |
1624 | , ( "export-secret", "export (both public and secret) information into your keyring" ) | 1618 | , ( "export-secret", "export (both public and secret) information into your keyring" ) |
1625 | , ( "export-public", "import (public) information into your keyring" ) | 1619 | , ( "export-public", "import (public) information into your keyring" ) |
1626 | , ( "working-key", "show the current working master key and its subkeys" ) | ||
1627 | , ( "merge", "low level import/export operation" ) | 1620 | , ( "merge", "low level import/export operation" ) |
1628 | , ( "init-key", "initialize the samizdat key ring") | 1621 | , ( "init-key", "initialize the samizdat key ring") |
1629 | , ( "delete", "Delete a subkey and its associated signatures" ) | 1622 | , ( "delete", "Delete a subkey and its associated signatures" ) |
@@ -1646,7 +1639,7 @@ main = do | |||
1646 | args_raw <- getArgs | 1639 | args_raw <- getArgs |
1647 | case args_raw of | 1640 | case args_raw of |
1648 | 1641 | ||
1649 | [] -> kiki "working-key" [] | 1642 | [] -> kiki "show" ["--working"] |
1650 | 1643 | ||
1651 | cmd : args | cmd `elem` map fst commands | 1644 | cmd : args | cmd `elem` map fst commands |
1652 | -> kiki cmd args | 1645 | -> kiki cmd args |