cofyc / argparse

Command-line arguments parsing library.
MIT License
658 stars 122 forks source link

Positional arguments? #46

Open tripulse opened 2 years ago

tripulse commented 2 years ago

The feature section on the README talks about positional arguments but no example has been shown and I can't find how it can be done even after reading the code.

cofyc commented 2 years ago

positional arguments are remainder arguments after all positional optional arguments are processed and removed, see the example code here

tripulse commented 2 years ago

after all positional arguments are processed and removed

you mean optional arguments, right?

cofyc commented 2 years ago

yes, my typo

tripulse commented 2 years ago

oh okay

tripulse commented 2 years ago

but you have to parse the value types manually, wouldn't it be more easier that we specify positonals in the argparse_option array so it takes care of it.

tripulse commented 2 years ago

but wait, that modifies a const char**