summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-04-30 19:28:15 -0400
committerJoey Hess <joeyh@joeyh.name>2017-04-30 19:28:15 -0400
commit5d3e80aeec03af9a5b271757e31a802d8fcb3eeb (patch)
treef490f691fa1d77b07130dacbda5853eaee3df54b /CmdLine.hs
parent1a360fda8bd9fcf29ebb7c8b581a670045c46495 (diff)
downloaddebug-me-5d3e80aeec03af9a5b271757e31a802d8fcb3eeb.tar.gz
add --use-server option for user
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 5512e75..0046b4c 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -6,6 +6,7 @@
module CmdLine where
import Types
+import ServerList
import Data.Monoid
import Options.Applicative
@@ -29,6 +30,7 @@ data Mode
data UserOpts = UserOpts
{ cmdToRun :: Maybe String
+ , useServer :: URI
}
data DeveloperOpts = DeveloperOpts
@@ -82,6 +84,13 @@ parseMode = (UserMode <$> parseuser)
<> metavar "command"
<> help "program to run (default: login shell)"
))
+ <*> option readurl
+ ( long "use-server"
+ <> metavar "url"
+ <> value defaultServerUrl
+ <> showDefault
+ <> help "url of debug-me server to use"
+ )
parsedeveloper = DeveloperOpts
<$> argument readurl
( metavar "url"