summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-26 17:31:30 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-26 18:13:40 -0400
commit3c7d3b3a2088cfe3698c3b055822c2b9fa67468a (patch)
treeea059c1d13981e12d461bb7485406aaea0d2ba1c /CmdLine.hs
parent8f2d5a67911ae22ff5bf0a191aa63cbb61da32ac (diff)
downloaddebug-me-3c7d3b3a2088cfe3698c3b055822c2b9fa67468a.tar.gz
gpg sign developer session key
And part of what we need to have users verify them. This commit was sponsored by andrea rota.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index f00f0be..a2f900b 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -18,7 +18,8 @@ data Mode
| ServerMode ServerOpts
data UserOpts = UserOpts
- { cmdToRun :: Maybe (String, [String])
+ { gpgOpts :: [String]
+ , cmdToRun :: Maybe (String, [String])
}
type UrlString = String
@@ -62,7 +63,12 @@ parseMode = (UserMode <$> parseuser)
<|> (ServerMode <$> parseserver)
where
parseuser = UserOpts
- <$> optional ((,)
+ <$> many (option str
+ ( long "gpg-opt"
+ <> short 'g'
+ <> help "option to pass to gpg"
+ ))
+ <*> optional ((,)
<$> strArgument (metavar "cmd")
<*> many (strArgument (metavar "opts")))
parsegraphviz = GraphvizOpts