diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-12 11:44:34 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-12 11:44:34 -0400 |
commit | 3ee306d3d4bda52268f07df874070b65d171694e (patch) | |
tree | 4ed6a83a2e4358b0dd0ff4a0a5c62108a99286c2 /CmdLine.hs | |
parent | a58aea595a780c91bbbe26d2d24a63abcd835994 (diff) | |
download | keysafe-3ee306d3d4bda52268f07df874070b65d171694e.tar.gz |
add --gui option
Diffstat (limited to 'CmdLine.hs')
-rw-r--r-- | CmdLine.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |