improve readme

This commit is contained in:
Carl Pearson
2020-03-24 12:55:20 -05:00
parent c0f8ceea71
commit b882280ac6

View File

@@ -3,31 +3,16 @@
[![Build Status](https://travis-ci.com/cwpearson/argparse.svg?branch=master)](https://travis-ci.com/cwpearson/argparse)
Simple single-file header-only CLI option parsing for C++.
No subcommands or grouped commands.
Only supports `-s value`/`--long-option value` style for options.
Only supports `--long-flag` style for flags.
* No std::regex
* No subcommands or grouped commands.
* Only supports `-s value`/`--long-option value` style for options.
* Only supports `--long-flag` style for flags.
## Getting Started
Download the latest [`argparse.hpp`](www.google.com) and include it in your project.
## Features
- [x] allow (default) / disallow (`Parser::no_unrecognize()`) unrecognized options and flags
- [x] optional/required (`PosnlBase::required()`) positional arguments
- [x] flags with `-s`, `--long-flag` formats
- [x] options with `--long-opt val` format
- [x] positional arguments
- [x] `--` to stop parsing options and flags
- [x] modify `argc`/`argv` (disable with `Parser::no_consume()`)
- Option/Positional Argument Types
- [x] `int`
- [x] `size_t`
- [x] `float`
- [x] `double`
- [x] `std::string`
## Examples
## Example
```c++
#include "argparse/argparse.hpp"
@@ -77,6 +62,23 @@ int main(int argc, char **argv) {
}
```
## Features
- [x] Does not require `std::regex`
- [x] allow (default) / disallow (`Parser::no_unrecognize()`) unrecognized options and flags
- [x] optional/required (`PosnlBase::required()`) positional arguments
- [x] flags with `-s`, `--long-flag` formats
- [x] options with `--long-opt val` format
- [x] positional arguments
- [x] `--` to stop parsing options and flags
- [x] modify `argc`/`argv` (disable with `Parser::no_consume()`)
- Option/Positional Argument Types
- [x] `int`
- [x] `size_t`
- [x] `float`
- [x] `double`
- [x] `std::string`
## Roadmap
- [ ] Reject duplicate flags / options