From 3ee306d3d4bda52268f07df874070b65d171694e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Aug 2016 11:44:34 -0400 Subject: add --gui option --- CmdLine.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CmdLine.hs') 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 -- cgit v1.2.3