A compact and efficient software module that simplifies the handling of command-line options in C programs like the linux option. Offering developers an easy way to incorporate customizable and flexible behaviors into their applications.
Key Features • How To Use • Credits • Related • License
-
A list of custom return statut that describe the the option traitment.
-
Built-in
help
option you can custom.Note This option if is entered, will interup the traitment of the possible other option. Not regarding the position of it.
-
An environement variable is available too.
-
Possibility to creat option that stop the program the module is use for.
-
There is an indicator that specify the traitment of the next argument to not be possibly considered as an option.
Note The default value for it is
--
, but can be change on the interface of the module. -
Option can be represented like descried below :
Short representation Long representation Beging by the character -
, is defined by a single character.Beging by the sequence --
, is defined by a sequence of characters. -
Short and long option can need argument.
Note For the short one, the separator between the option and the argument must be space. In contrary, for the long one, the separator can be change on the interface. By default, is value is
=
. -
For the short option, you can call them by joining their short representation. Just like below :
Example
-ivh
will be equivalent to the call of-i -v -h
(wherei
andv
represente a short option). -
For the long one, you can call an option by calling a non ambiguous prefix of it (a prefix is ambiguous if he is a prefix of at least two option). Example just below :
Example
--help
is equivalent to the call--h
,--he
,--hel
is there isn't any option that haveh
,he
orhel
for prefixe.
To use this module you'll have to clone this project and them use it has mutch has you want 😁.
Opt-L is an emailware. Meaning, if you liked using this app or it has helped you in any way, we'd like you send us an email at theo.renauxv@gmail.com or Lurgrid@gmail.com about anything you'd want to say about this software.
The readme of this project was made using a template from Markdownify.
Ressource use to make this module :
Lnid - An identical line finder between/in file(s) that use this module for his option.
GPLv3