File: Test02.shell-protocol

package info (click to toggle)
haskell-getopt-generics 0.13.1.0-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 260 kB
  • sloc: haskell: 1,644; makefile: 6
file content (21 lines) | stat: -rw-r--r-- 685 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ program --port 8080 --config some/path
Options {port = 8080, daemonize = False, config = Just "some/path", args = []}
$ program --port 8080 --config some/path --foo true
unrecognized option `--foo'
unknown argument: true
# exit-code 1
$ program  --port 8080 --daemonize --config some
Options {port = 8080, daemonize = True, config = Just "some", args = []}
$ program --port foo
cannot parse as INTEGER: foo
# exit-code 1
$ program
missing option: --port=INTEGER
# exit-code 1
$ program --help
program [OPTIONS]
      --port=INTEGER
      --daemonize
      --config=STRING (optional)
      --args=STRING (multiple possible)
  -h  --help                             show help and exit