iffy / nim-argparse

Argument parsing for Nim
MIT License
120 stars 8 forks source link

Required options override ShortCircuits when calling parse() #57

Closed iffy closed 3 years ago

iffy commented 3 years ago

I wonder if parse should raise ShortCircuit when one is encountered, rather than having people check for .help == true?

  test "required options still allow for --help":
    var p = newParser:
      option("-b", required=true)
    expect ShortCircuit:
      discard p.parse(shlex"--help")