Commit Graph

2 Commits

Author SHA1 Message Date
Pranav Srinivas Kumar
6c7da857b6 Added table of contents to README and clang formatted code 2022-09-20 20:27:24 -07:00
Sean Robinson
ea1f7ef663 Allow removal of default arguments (i.e. --help and --version)
The help and version arguments are still included by default, but which
default arguments to include can be overridden at ArgumentParser creation.

argparse generally copies Python argparse behavior.  This includes a
default `--help`/`-h` argument to print a help message and exit.  Some
developers using argparse find the automatic exit to be undesirable.

The Python argparse has an opt-out parameter when constructing an
ArgumentParser.  Using `add_help=False` avoids adding a default `--help`
argument and allows the developer to implement a custom help.

This commit adds a similar opt-out to our C++ argparse, but keeps the
current behavior as the default.  The `--help`/`-h` and `--version`/`-v`
Arguments handle their own output and exit rather than specially treating
them in ArgumentParser::parse_args_internal.

Closes #119
Closes #138
Closes #139

Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
2021-10-27 09:02:33 -07:00