summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-12 11:44:34 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-12 11:44:34 -0400
commit3ee306d3d4bda52268f07df874070b65d171694e (patch)
tree4ed6a83a2e4358b0dd0ff4a0a5c62108a99286c2 /CmdLine.hs
parenta58aea595a780c91bbbe26d2d24a63abcd835994 (diff)
downloadkeysafe-3ee306d3d4bda52268f07df874070b65d171694e.tar.gz
add --gui option
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 3d45d5a..2b494db 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -14,6 +14,7 @@ data CmdLine = CmdLine
, name :: Name
, keytype :: KeyType
, testMode :: Bool
+ , gui :: Bool
}
deriving (Show)
@@ -26,6 +27,7 @@ parse = CmdLine
<*> nameopt
<*> keytypeopt
<*> testmodeswitch
+ <*> guiswitch
where
backup = flag' Backup
( long "backup"
@@ -47,6 +49,10 @@ parse = CmdLine
( long "testmode"
<> help "Avoid using expensive cryptographic operation to secure key. Use for testing only, not with real secret keys."
)
+ guiswitch = switch
+ ( long "gui"
+ <> help "Use GUI interface for interaction. Default is to use readline interface when run in a terminal, and GUI otherwise."
+ )
get :: IO CmdLine
get = execParser opts