mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-03 22:54:39 +00:00
Replace spaces with underscores in example program names
These examples give a false impression that a space in the middle of the application name is well handled. While a space might be possible, it must be escaped in shells, i.e. a common environment for a CLI argument parser. Signed-off-by: Sean Robinson <sean.robinson@scottsdalecc.edu>
This commit is contained in:
parent
8772b37aab
commit
58777d8c84
@ -27,7 +27,7 @@ Simply include argparse.hpp and you're good to go.
|
||||
To start parsing command-line arguments, create an ```ArgumentParser```.
|
||||
|
||||
```cpp
|
||||
argparse::ArgumentParser program("program name");
|
||||
argparse::ArgumentParser program("program_name");
|
||||
```
|
||||
|
||||
**NOTE:** There is an optional second argument to the `ArgumentParser` which is the program version. Example: `argparse::ArgumentParser program("libfoo", "1.9.0");`
|
||||
@ -49,7 +49,7 @@ Here's an example of a ***positional argument***:
|
||||
#include <argparse/argparse.hpp>
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
argparse::ArgumentParser program("program name");
|
||||
argparse::ArgumentParser program("program_name");
|
||||
|
||||
program.add_argument("square")
|
||||
.help("display the square of a given integer")
|
||||
|
Loading…
Reference in New Issue
Block a user