improve readme
This commit is contained in:
42
README.md
42
README.md
@@ -3,31 +3,16 @@
|
||||
[](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
|
||||
|
Reference in New Issue
Block a user