1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! # Command Line Parse
//!
//! `cl_parse` is a library that allows you to define commandline options and arguments and then
//! parse the commandline arguments based on that definition.
//!
//! # Motivation
//!
//! `cl_parse` was developed to allow the most common commandline options that are used in
//! modern commandline utilities. It was also designed for ease of use. The following are the features
//! implemented in `cl_parse`:
//!
//! - option aliases, e.g., `vec!["-f", "--file"]`
//! - options with negative values, e.g., `--increment -1`
//! - option default value
//! - option valid values, e.g., for --optimize valid values `vec!["1","2","3"]`
//! - flag concatenation, e.g., `-xvgf` instead of `-x -v -g -f`
//! - Auto usage message generation
//! - Auto help message generation
//! - `-h`, `--help` output provided by default
//! - missing value detection for options
//! - ability to define required options
//! - option and argument validation, i.e., only defined options and arguments can be used.
//! - unordered options and arguments
//! - retrieving the option or argument in the target type, e.g., `i32`, `String`, etc.
//!
//! # Examples
//!
/// # Command Line Def
///
/// `cl_def` is used to define and parse commandline options and arguments
/// # Command Line
///
/// `command_line` is a collection of utilities for processing commandline arguments
pub use CommandLineDef;
pub use CommandLine;