A small library to manage command line options and configuration parameters.
Find a file
2022-10-26 19:07:01 +03:00
examples + Trigger Options 2022-10-21 00:07:41 +03:00
source % fixed accepting wrong key when used twice 2022-10-26 19:07:01 +03:00
.gitignore small start 2022-10-05 19:48:23 +03:00
default.gpr small start 2022-10-05 19:48:23 +03:00
LICENSE Initial commit 2022-10-05 16:02:08 +00:00
options.gpr small start 2022-10-05 19:48:23 +03:00
README.md Unbounded string option introduced 2022-10-12 19:46:39 +03:00

Options

A small library to manage command line options and configuration parameters.

Compiling

This library is written on Ada 2012 with no dependencies. You can compile it with any suitable compiler. If you use GPR tools you can use it too.

Command line parsing

Properties of options

  • Multiple - option can take multiple values.

Key and positional association

Options may Need Key. When parsing the command line it should be always prepended by its key name. If it is also hve a property "multiple" then every value should be prepended.

If the option does not need key, it can get a value without the need of a key. Options not needing a key are associated with command line arguments in order of their appearance.

Note: for options not needing a key there's no way to take positional arguments past multiple option. So it should be the last one.