clargs

Crates.ioclargs
lib.rsclargs
version1.0.0
sourcesrc
created_at2018-02-08 21:22:43.142086
updated_at2018-09-03 14:46:28.95226
descriptionA command-line arguments parsing library.
homepage
repositoryhttps://github.com/Zeldhoron/clargs
max_upload_size
id50257
size71,554
(Zeldhoron)

documentation

README

Clargs is a library for parsing command-line arguments.

Parsing command-line arguments requires quite a bit of boilerplate code. This library remedies that for rust projects.

Before parsing an argument list a ParsingConfig object must be configured. It controls which features are enabled and how certain edge cases should be handled. It is also used to add flags, parameters, subcommands and specify which parameters are required and other extra info. Once configured, it can be used with the parse function.

A flag is an option that has a name and does not require an argument. A named parameter is an option that has a name and that does require an argument. An unnamed parameter is an option that is neither a flag, a named parameter, nor an argument to a named parameter. An alias maps one name to an option that already has another name.

Options are identified by the name they were registered with. Aliases are only used during interpretation of the command-line arguments. As a result of this, they will never occur in the results or an error after parsing.

All option names and aliases can contain only lower and uppercase letters and hyphens.

Note that the first argument is always interpreted as the name of the command (or subcommand) which was invoked.

Commit count: 0

cargo fmt