Crates.io | rsclp |
lib.rs | rsclp |
version | 0.1.6 |
source | src |
created_at | 2024-03-03 14:57:30.207132 |
updated_at | 2024-03-14 20:34:59.470654 |
description | A lib crate to parse proccess arguments |
homepage | |
repository | https://github.com/fstafforte/rsclp |
max_upload_size | |
id | 1160682 |
size | 78,423 |
Command line parser rust lib crate
Command line parser is able to parse process arguments. Arguments could be of two types, single character argument (i.g -c) or long text argument (i.g. --config-file)
Integer, Floating point and String option has a mandatory angument while Boolean option does not require an argument.
Argument can be passed in two ways:
--config-file=config/app.properties or --config-file config/app.properties
the same example is valid for single character options -c=config/app.properties or -c config/app.properties.
Single character option can be pass grouped together (i.g -xvz). Be careful if a single character argument needs an argument you have to pass it or adding = and the value (i.g. -xvzf=file_to_compress.tar.gz) or as next process argument (i.g -xvzf file_to_compress.tar.gz). NOTE: No more than a single character option with a mandatory argument can be grouped.
2024-March-03 - Bug description: mandatory options are checked even if help option or version is set.
Solution: method check_mandatory_options is not private anymore and the user can callit after the help or version option check
2024-March-07 Bug, wrong management of -- (dashdash) option when prsing mode is set to ParsingMode::DefaultParsingMode solved