diff --git a/docs/api/cliparser/fn.help.html b/docs/api/cliparser/fn.help.html index 35bebdf..a0191cd 100644 --- a/docs/api/cliparser/fn.help.html +++ b/docs/api/cliparser/fn.help.html @@ -6,6 +6,6 @@
-

Function cliparser::help

source · []
pub fn help(spec: &CliSpec) -> String
Expand description

Generates and returns the spec help text

+

Function cliparser::help

source · []
pub fn help(spec: &CliSpec) -> String
Expand description

Generates and returns the spec help text

\ No newline at end of file diff --git a/docs/api/cliparser/fn.parse.html b/docs/api/cliparser/fn.parse.html index d22b135..59e986d 100644 --- a/docs/api/cliparser/fn.parse.html +++ b/docs/api/cliparser/fn.parse.html @@ -6,7 +6,7 @@
-

Function cliparser::parse

source · []
pub fn parse(
    command_line: &Vec<&str>,
    spec: &CliSpec
) -> Result<CliParsed, ParserError>
Expand description

Parsers the given command line based on the given spec and returns the result.
+

Function cliparser::parse

source · []
pub fn parse(
    command_line: &Vec<&str>,
    spec: &CliSpec
) -> Result<CliParsed, ParserError>
Expand description

Parsers the given command line based on the given spec and returns the result.
In case of error (such as invalid input), an error will be returned.
In case the command line does not match the spec, Ok(None) will be returned.

Example

@@ -21,109 +21,98 @@

Example

let mut cli_spec = CliSpec::new(); // Add meta info to support help and version text generation - cli_spec.meta_info = Some(CliSpecMetaInfo { - author: Some("Sagie Gur-Ari".to_string()), - version: Some("1.2.3-beta".to_string()), - description: Some("Amazing example".to_string()), - project: Some("example".to_string()), - help_post_text: Some( - "See more info at: https://github.com/sagiegurari/cargo-make".to_string(), - ), - }); - - // Define the prefix of the arguments. - // It can be a command/s (path prefix ignored) and/or a sub command/s - // If not defined, the parsing will start checking the arguments only. - // In this example, the spec defines two ways to invoke a process, either - // as 'makers' or as 'cargo make' and afterwards the arguments. - cli_spec - .command - .push(Command::Command("makers".to_string())); - cli_spec.command.push(Command::SubCommand(vec![ - "cargo".to_string(), - "make".to_string(), - ])); - - // Positional arguments come after all the known argument keys. - // If the positional is None, positional arguments are not allowed. - // Add -- to the command line forces positional arguments and stops key - // based argument parsing. - cli_spec.positional_argument = Some(PositionalArgument { - name: "args".to_string(), - help: Some(ArgumentHelp::TextAndParam( - "The command line arguments".to_string(), - "ARGS".to_string(), - )), - }); - - // Add a 'flag' only argument which is an argument that does not accept any value. - // You can define multiple variations of the parameter name. - // For example, in this case putting --flag or -f in the command line would be parsed - // as the 'flag' parameter. - cli_spec.arguments.push(Argument { - name: "flag".to_string(), - key: vec!["--flag".to_string(), "-f".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::None, - default_value: None, - help: Some(ArgumentHelp::Text( - "A flag without value example".to_string(), - )), - }); - - // Add an argument that accepts a single value, for example -s value - cli_spec.arguments.push(Argument { - name: "single".to_string(), - key: vec!["--s1".to_string(), "-s".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::Single, - default_value: None, - help: Some(ArgumentHelp::Text( - "A parameter with single value example".to_string(), - )), - }); - - // Add an argument that accepts multiple values - cli_spec.arguments.push(Argument { - name: "mo".to_string(), - key: vec!["--mo1".to_string(), "-mo2".to_string()], - argument_occurrence: ArgumentOccurrence::Multiple, - value_type: ArgumentValueType::Single, - default_value: None, - help: Some(ArgumentHelp::Text( - "A parameter with multiple values example".to_string(), - )), - }); - - // Add an argument that can appear multiple times. - // Even if the value type if Single, multiple occurrences will - // enable the argument to collect multiple values (one for each occurrence). - cli_spec.arguments.push(Argument { - name: "mv".to_string(), - key: vec!["--mv1".to_string(), "-mv2".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::Multiple, - default_value: None, - help: Some(ArgumentHelp::Text( - "A parameter with single value but can appear multiple times example".to_string(), - )), - }); - - // We can define a 'default' value. - // In case the argument is not in the command line, we will get the default value. - // However, the argument names list in the parsed struct will not include this - // argument as it was not found. Only the argument values will contain it. - // This is a good way to understand that we have a value but it was not entered by the caller. - cli_spec.arguments.push(Argument { - name: "default".to_string(), - key: vec!["--d1".to_string(), "-d".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::Single, - default_value: Some("some default".to_string()), - help: Some(ArgumentHelp::Text( - "A parameter with default value example".to_string(), - )), - }); + cli_spec = cli_spec + .set_meta_info(Some(CliSpecMetaInfo { + author: Some("Sagie Gur-Ari".to_string()), + version: Some("1.2.3-beta".to_string()), + description: Some("Amazing example".to_string()), + project: Some("example".to_string()), + help_post_text: Some( + "See more info at: https://github.com/sagiegurari/cargo-make".to_string(), + ), + })) + // Define the prefix of the arguments. + // It can be a command/s (path prefix ignored) and/or a sub command/s + // If not defined, the parsing will start checking the arguments only. + // In this example, the spec defines two ways to invoke a process, either + // as 'makers' or as 'cargo make' and afterwards the arguments. + .add_command("makers") + .add_subcommand(vec!["cargo", "make"]) + // Positional arguments come after all the known argument keys. + // If the positional is None, positional arguments are not allowed. + // Add -- to the command line forces positional arguments and stops key + // based argument parsing. + .set_positional_argument(Some(PositionalArgument { + name: "args".to_string(), + help: Some(ArgumentHelp::TextAndParam( + "The command line arguments".to_string(), + "ARGS".to_string(), + )), + })) + // Add a 'flag' only argument which is an argument that does not accept any value. + // You can define multiple variations of the parameter name. + // For example, in this case putting --flag or -f in the command line would be parsed + // as the 'flag' parameter. + .add_argument(Argument { + name: "flag".to_string(), + key: vec!["--flag".to_string(), "-f".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::None, + default_value: None, + help: Some(ArgumentHelp::Text( + "A flag without value example".to_string(), + )), + }) + // Add an argument that accepts a single value, for example -s value + .add_argument(Argument { + name: "single".to_string(), + key: vec!["--s1".to_string(), "-s".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::Single, + default_value: None, + help: Some(ArgumentHelp::Text( + "A parameter with single value example".to_string(), + )), + }) + // Add an argument that accepts multiple values + .add_argument(Argument { + name: "mo".to_string(), + key: vec!["--mo1".to_string(), "-mo2".to_string()], + argument_occurrence: ArgumentOccurrence::Multiple, + value_type: ArgumentValueType::Single, + default_value: None, + help: Some(ArgumentHelp::Text( + "A parameter with multiple values example".to_string(), + )), + }) + // Add an argument that can appear multiple times. + // Even if the value type if Single, multiple occurrences will + // enable the argument to collect multiple values (one for each occurrence). + .add_argument(Argument { + name: "mv".to_string(), + key: vec!["--mv1".to_string(), "-mv2".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::Multiple, + default_value: None, + help: Some(ArgumentHelp::Text( + "A parameter with single value but can appear multiple times example".to_string(), + )), + }) + // We can define a 'default' value. + // In case the argument is not in the command line, we will get the default value. + // However, the argument names list in the parsed struct will not include this + // argument as it was not found. Only the argument values will contain it. + // This is a good way to understand that we have a value but it was not entered by the caller. + .add_argument(Argument { + name: "default".to_string(), + key: vec!["--d1".to_string(), "-d".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::Single, + default_value: Some("some default".to_string()), + help: Some(ArgumentHelp::Text( + "A parameter with default value example".to_string(), + )), + }); // Parsers the given command line based on the given spec and returns the result. // In case of invalid input or the provided spec does not match the command line, an error will be returned. @@ -132,7 +121,7 @@

Example

// which fits is found, use the parse_any and parse_process_any functions. let result = parse( &vec![ - "cargo", "make", "-mv2", "4", "5", "6", "--mo1", "1", "-mo2", "2", "-f", "-s", "3", + "cargo", "make", "-mv2", "4", "5", "6", "--mo1=1", "-mo2", "2", "-f", "-s", "3", "arg1", "arg2", "-mo2", "arg5", ], &cli_spec, diff --git a/docs/api/cliparser/fn.parse_any.html b/docs/api/cliparser/fn.parse_any.html index 7eeef7a..4fda722 100644 --- a/docs/api/cliparser/fn.parse_any.html +++ b/docs/api/cliparser/fn.parse_any.html @@ -6,7 +6,7 @@
pub fn parse_any(
    command_line: &Vec<&str>,
    specs: Vec<&CliSpec>
) -> Result<(usize, CliParsed), ParserError>
Expand description

Parsers the given command line based on the given specs and returns the result.
+

Function cliparser::parse_any

source · []
pub fn parse_any(
    command_line: &Vec<&str>,
    specs: Vec<&CliSpec>
) -> Result<(usize, CliParsed), ParserError>
Expand description

Parsers the given command line based on the given specs and returns the result.
In case of invalid input or none of the provided specs do not match the command line, an error will be returned.

\ No newline at end of file diff --git a/docs/api/cliparser/fn.parse_process.html b/docs/api/cliparser/fn.parse_process.html index ce655c4..1e406ac 100644 --- a/docs/api/cliparser/fn.parse_process.html +++ b/docs/api/cliparser/fn.parse_process.html @@ -6,7 +6,7 @@
pub fn parse_process(spec: &CliSpec) -> Result<CliParsed, ParserError>
Expand description

Parsers the given command line based on the given spec and returns the result.
+

Function cliparser::parse_process

source · []
pub fn parse_process(spec: &CliSpec) -> Result<CliParsed, ParserError>
Expand description

Parsers the given command line based on the given spec and returns the result.
In case of error (such as invalid input), an error will be returned.
In case the command line does not match the spec, Ok(None) will be returned.

diff --git a/docs/api/cliparser/fn.parse_process_any.html b/docs/api/cliparser/fn.parse_process_any.html index b316156..ce640e4 100644 --- a/docs/api/cliparser/fn.parse_process_any.html +++ b/docs/api/cliparser/fn.parse_process_any.html @@ -6,7 +6,7 @@
pub fn parse_process_any(
    specs: Vec<&CliSpec>
) -> Result<(usize, CliParsed), ParserError>
Expand description

Parsers the current process command line based on the given specs and returns the result.
+

Function cliparser::parse_process_any

source · []
pub fn parse_process_any(
    specs: Vec<&CliSpec>
) -> Result<(usize, CliParsed), ParserError>
Expand description

Parsers the current process command line based on the given specs and returns the result.
In case of invalid input or none of the provided specs do not match the command line, an error will be returned.

\ No newline at end of file diff --git a/docs/api/cliparser/fn.version.html b/docs/api/cliparser/fn.version.html index 166b6d7..bb77002 100644 --- a/docs/api/cliparser/fn.version.html +++ b/docs/api/cliparser/fn.version.html @@ -6,6 +6,6 @@
-

Function cliparser::version

source · []
pub fn version(spec: &CliSpec) -> String
Expand description

Generates and returns the spec version text

+

Function cliparser::version

source · []
pub fn version(spec: &CliSpec) -> String
Expand description

Generates and returns the spec version text

\ No newline at end of file diff --git a/docs/api/cliparser/index.html b/docs/api/cliparser/index.html index 68cdeec..f3e3c4b 100644 --- a/docs/api/cliparser/index.html +++ b/docs/api/cliparser/index.html @@ -6,7 +6,7 @@

Crate cliparser

Expand description
Expand description

cliparser

Simple command line parser.

This library provide a very simple API to parse command line arguments.
It will not cover all possible use cases in order to ensure a simple thin API.

@@ -22,109 +22,98 @@

Examples

let mut cli_spec = CliSpec::new(); // Add meta info to support help and version text generation - cli_spec.meta_info = Some(CliSpecMetaInfo { - author: Some("Sagie Gur-Ari".to_string()), - version: Some("1.2.3-beta".to_string()), - description: Some("Amazing example".to_string()), - project: Some("example".to_string()), - help_post_text: Some( - "See more info at: https://github.com/sagiegurari/cargo-make".to_string(), - ), - }); - - // Define the prefix of the arguments. - // It can be a command/s (path prefix ignored) and/or a sub command/s - // If not defined, the parsing will start checking the arguments only. - // In this example, the spec defines two ways to invoke a process, either - // as 'makers' or as 'cargo make' and afterwards the arguments. - cli_spec - .command - .push(Command::Command("makers".to_string())); - cli_spec.command.push(Command::SubCommand(vec![ - "cargo".to_string(), - "make".to_string(), - ])); - - // Positional arguments come after all the known argument keys. - // If the positional is None, positional arguments are not allowed. - // Add -- to the command line forces positional arguments and stops key - // based argument parsing. - cli_spec.positional_argument = Some(PositionalArgument { - name: "args".to_string(), - help: Some(ArgumentHelp::TextAndParam( - "The command line arguments".to_string(), - "ARGS".to_string(), - )), - }); - - // Add a 'flag' only argument which is an argument that does not accept any value. - // You can define multiple variations of the parameter name. - // For example, in this case putting --flag or -f in the command line would be parsed - // as the 'flag' parameter. - cli_spec.arguments.push(Argument { - name: "flag".to_string(), - key: vec!["--flag".to_string(), "-f".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::None, - default_value: None, - help: Some(ArgumentHelp::Text( - "A flag without value example".to_string(), - )), - }); - - // Add an argument that accepts a single value, for example -s value - cli_spec.arguments.push(Argument { - name: "single".to_string(), - key: vec!["--s1".to_string(), "-s".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::Single, - default_value: None, - help: Some(ArgumentHelp::Text( - "A parameter with single value example".to_string(), - )), - }); - - // Add an argument that accepts multiple values - cli_spec.arguments.push(Argument { - name: "mo".to_string(), - key: vec!["--mo1".to_string(), "-mo2".to_string()], - argument_occurrence: ArgumentOccurrence::Multiple, - value_type: ArgumentValueType::Single, - default_value: None, - help: Some(ArgumentHelp::Text( - "A parameter with multiple values example".to_string(), - )), - }); - - // Add an argument that can appear multiple times. - // Even if the value type if Single, multiple occurrences will - // enable the argument to collect multiple values (one for each occurrence). - cli_spec.arguments.push(Argument { - name: "mv".to_string(), - key: vec!["--mv1".to_string(), "-mv2".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::Multiple, - default_value: None, - help: Some(ArgumentHelp::Text( - "A parameter with single value but can appear multiple times example".to_string(), - )), - }); - - // We can define a 'default' value. - // In case the argument is not in the command line, we will get the default value. - // However, the argument names list in the parsed struct will not include this - // argument as it was not found. Only the argument values will contain it. - // This is a good way to understand that we have a value but it was not entered by the caller. - cli_spec.arguments.push(Argument { - name: "default".to_string(), - key: vec!["--d1".to_string(), "-d".to_string()], - argument_occurrence: ArgumentOccurrence::Single, - value_type: ArgumentValueType::Single, - default_value: Some("some default".to_string()), - help: Some(ArgumentHelp::Text( - "A parameter with default value example".to_string(), - )), - }); + cli_spec = cli_spec + .set_meta_info(Some(CliSpecMetaInfo { + author: Some("Sagie Gur-Ari".to_string()), + version: Some("1.2.3-beta".to_string()), + description: Some("Amazing example".to_string()), + project: Some("example".to_string()), + help_post_text: Some( + "See more info at: https://github.com/sagiegurari/cargo-make".to_string(), + ), + })) + // Define the prefix of the arguments. + // It can be a command/s (path prefix ignored) and/or a sub command/s + // If not defined, the parsing will start checking the arguments only. + // In this example, the spec defines two ways to invoke a process, either + // as 'makers' or as 'cargo make' and afterwards the arguments. + .add_command("makers") + .add_subcommand(vec!["cargo", "make"]) + // Positional arguments come after all the known argument keys. + // If the positional is None, positional arguments are not allowed. + // Add -- to the command line forces positional arguments and stops key + // based argument parsing. + .set_positional_argument(Some(PositionalArgument { + name: "args".to_string(), + help: Some(ArgumentHelp::TextAndParam( + "The command line arguments".to_string(), + "ARGS".to_string(), + )), + })) + // Add a 'flag' only argument which is an argument that does not accept any value. + // You can define multiple variations of the parameter name. + // For example, in this case putting --flag or -f in the command line would be parsed + // as the 'flag' parameter. + .add_argument(Argument { + name: "flag".to_string(), + key: vec!["--flag".to_string(), "-f".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::None, + default_value: None, + help: Some(ArgumentHelp::Text( + "A flag without value example".to_string(), + )), + }) + // Add an argument that accepts a single value, for example -s value + .add_argument(Argument { + name: "single".to_string(), + key: vec!["--s1".to_string(), "-s".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::Single, + default_value: None, + help: Some(ArgumentHelp::Text( + "A parameter with single value example".to_string(), + )), + }) + // Add an argument that accepts multiple values + .add_argument(Argument { + name: "mo".to_string(), + key: vec!["--mo1".to_string(), "-mo2".to_string()], + argument_occurrence: ArgumentOccurrence::Multiple, + value_type: ArgumentValueType::Single, + default_value: None, + help: Some(ArgumentHelp::Text( + "A parameter with multiple values example".to_string(), + )), + }) + // Add an argument that can appear multiple times. + // Even if the value type if Single, multiple occurrences will + // enable the argument to collect multiple values (one for each occurrence). + .add_argument(Argument { + name: "mv".to_string(), + key: vec!["--mv1".to_string(), "-mv2".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::Multiple, + default_value: None, + help: Some(ArgumentHelp::Text( + "A parameter with single value but can appear multiple times example".to_string(), + )), + }) + // We can define a 'default' value. + // In case the argument is not in the command line, we will get the default value. + // However, the argument names list in the parsed struct will not include this + // argument as it was not found. Only the argument values will contain it. + // This is a good way to understand that we have a value but it was not entered by the caller. + .add_argument(Argument { + name: "default".to_string(), + key: vec!["--d1".to_string(), "-d".to_string()], + argument_occurrence: ArgumentOccurrence::Single, + value_type: ArgumentValueType::Single, + default_value: Some("some default".to_string()), + help: Some(ArgumentHelp::Text( + "A parameter with default value example".to_string(), + )), + }); // Parsers the given command line based on the given spec and returns the result. // In case of invalid input or the provided spec does not match the command line, an error will be returned. @@ -133,7 +122,7 @@

Examples

// which fits is found, use the parse_any and parse_process_any functions. let result = parse( &vec![ - "cargo", "make", "-mv2", "4", "5", "6", "--mo1", "1", "-mo2", "2", "-f", "-s", "3", + "cargo", "make", "-mv2", "4", "5", "6", "--mo1=1", "-mo2", "2", "-f", "-s", "3", "arg1", "arg2", "-mo2", "arg5", ], &cli_spec, diff --git a/docs/api/cliparser/types/index.html b/docs/api/cliparser/types/index.html index 26baaf1..901bbaf 100644 --- a/docs/api/cliparser/types/index.html +++ b/docs/api/cliparser/types/index.html @@ -6,7 +6,7 @@

Module types

Expand description
Expand description

types

Defines the various types.

Structs

Holds the command line argument spec

diff --git a/docs/api/cliparser/types/struct.CliParsed.html b/docs/api/cliparser/types/struct.CliParsed.html index abf5375..1563dd8 100644 --- a/docs/api/cliparser/types/struct.CliParsed.html +++ b/docs/api/cliparser/types/struct.CliParsed.html @@ -3,10 +3,10 @@

pub struct CliParsed {
+    

Struct cliparser::types::CliParsed

source · []
pub struct CliParsed {
     pub arguments: HashSet<String>,
     pub argument_values: HashMap<String, Vec<String>>,
 }
Expand description

Holds the command line parse result

@@ -17,15 +17,16 @@

Struct cliparser -

Implementations

Returns new instance

-

Trait Implementations

Returns a copy of the value. Read more

+

Implementations

Returns new instance

+

returns the first value (if exists)

+

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

-

Formats the value using the given formatter. Read more

-

Returns the “default value” for a type. Read more

-

This method tests for self and other values to be equal, and is used +

Formats the value using the given formatter. Read more

+

Returns the “default value” for a type. Read more

+

This method tests for self and other values to be equal, and is used by ==. Read more

-

This method tests for !=.

-

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

+

This method tests for !=.

+

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

diff --git a/docs/api/cliparser/types/struct.CliSpec.html b/docs/api/cliparser/types/struct.CliSpec.html index 50eb776..90a5626 100644 --- a/docs/api/cliparser/types/struct.CliSpec.html +++ b/docs/api/cliparser/types/struct.CliSpec.html @@ -3,7 +3,7 @@

pub struct CliSpec {
@@ -17,7 +17,12 @@ 

Struct cliparserpositional_argument: Option<PositionalArgument>

The name of the argument that will hold all arguments after the last known key based argument. If not defined, such positional arguments are not allowed.

meta_info: Option<CliSpecMetaInfo>

Meta information used for generating version and help messages

-

Implementations

Returns new instance

+

Implementations

Returns new instance

+

Sets the spec meta info

+

Adds a command to the spec

+

Adds a sub command to the spec

+

Sets the PositionalArgument

+

Adds a Argument

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

diff --git a/docs/api/search-index.js b/docs/api/search-index.js index daf8962..3e59ece 100644 --- a/docs/api/search-index.js +++ b/docs/api/search-index.js @@ -1,5 +1,5 @@ var searchIndex = JSON.parse('{\ -"cliparser":{"doc":"cliparser","t":[5,5,5,5,5,0,5,3,4,4,4,3,3,3,4,13,13,13,13,13,13,13,13,4,3,13,13,13,13,13,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12],"n":["help","parse","parse_any","parse_process","parse_process_any","types","version","Argument","ArgumentHelp","ArgumentOccurrence","ArgumentValueType","CliParsed","CliSpec","CliSpecMetaInfo","Command","Command","CommandDoesNotMatchSpec","InternalError","InvalidCliSpec","InvalidCommandLine","Multiple","Multiple","None","ParserError","PositionalArgument","Single","Single","SubCommand","Text","TextAndParam","argument_occurrence","argument_values","arguments","arguments","author","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","command","default","default","default","default_value","description","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","help","help","help_post_text","into","into","into","into","into","into","into","into","into","into","key","meta_info","name","name","ne","ne","ne","ne","ne","ne","ne","new","new","new","positional_argument","project","source","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value_type","version","0","0","1","0","0","0","0","0","0"],"q":["cliparser","","","","","","","cliparser::types","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","cliparser::types::ArgumentHelp","","","cliparser::types::Command","","cliparser::types::ParserError","","",""],"d":["Generates and returns the spec help text","Parsers the given command line based on the given spec and …","Parsers the given command line based on the given specs …","Parsers the given command line based on the given spec and …","Parsers the current process command line based on the …","types","Generates and returns the spec version text","Holds the command line argument spec","The argument help text","The argument occurrence type (see values for more info)","The argument value type (see values for more info)","Holds the command line parse result","Holds the command line spec (command/parameters/…)","Holds the command line spec meta information used to …","The command (not params) string/s","Single command (not sub command) such as: “ls”. Any …","Error Info Type","Error Info Type","Error Info Type","Error Info Type","The argument can appear multiple times. The value of each …","Allows multiple values (minimum one)","The argument does not accept any value","Holds the error information","Holds the positional argument spec","The argument can appear only once","Only single value is allowed","Sub command value such as: vec![“cargo”.to_string(), …","Text value","Text and variable name","The argument occurrence (see enum)","A map of all values for arguments found. The map will …","A list of all possible command line arguments.","A collection of all arguments found (list of names not …","Author name","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A list of all possible commands and sub commands.","","","","Default value if not found","Description string","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Help text","Help text","Post help text","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","All possible argument keys in the command line (for …","Meta information used for generating version and help …","Unique name for the argument later used to pull the parsed …","Unique name for the argument later used to pull the parsed …","","","","","","","","Returns new instance","Returns new instance","Returns new instance","The name of the argument that will hold all arguments …","Project name","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The possible value type for this specific argument","Version string","","","","","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,4,4,0,0,3,4,1,5,5,6,7,8,7,9,2,1,3,4,5,6,10,9,8,7,2,1,3,4,5,6,10,9,8,7,1,3,4,5,6,10,9,8,7,1,3,4,5,6,10,9,8,7,8,9,8,7,6,9,1,3,4,5,6,10,9,8,7,2,2,1,3,4,5,6,10,9,8,7,2,1,3,4,5,6,10,9,8,7,6,10,9,2,1,3,4,5,6,10,9,8,7,6,8,6,10,1,5,6,10,9,8,7,9,8,7,8,9,2,1,3,4,5,6,10,9,8,7,2,2,1,3,4,5,6,10,9,8,7,2,1,3,4,5,6,10,9,8,7,2,1,3,4,5,6,10,9,8,7,6,9,11,12,12,13,14,15,16,17,18],"f":[[[["clispec",3]],["string",3]],[[["vec",3],["clispec",3]],["result",4,[["cliparsed",3],["parsererror",4]]]],[[["vec",3],["vec",3,[["clispec",3]]]],["result",4,[["parsererror",4]]]],[[["clispec",3]],["result",4,[["cliparsed",3],["parsererror",4]]]],[[["vec",3,[["clispec",3]]]],["result",4,[["parsererror",4]]]],null,[[["clispec",3]],["string",3]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["command",4]],["command",4]],[[["argumentoccurrence",4]],["argumentoccurrence",4]],[[["argumentvaluetype",4]],["argumentvaluetype",4]],[[["argumenthelp",4]],["argumenthelp",4]],[[["argument",3]],["argument",3]],[[["positionalargument",3]],["positionalargument",3]],[[["clispecmetainfo",3]],["clispecmetainfo",3]],[[["clispec",3]],["clispec",3]],[[["cliparsed",3]],["cliparsed",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],null,[[],["clispecmetainfo",3]],[[],["clispec",3]],[[],["cliparsed",3]],null,null,[[["command",4],["command",4]],["bool",0]],[[["argumentoccurrence",4],["argumentoccurrence",4]],["bool",0]],[[["argumentvaluetype",4],["argumentvaluetype",4]],["bool",0]],[[["argumenthelp",4],["argumenthelp",4]],["bool",0]],[[["argument",3],["argument",3]],["bool",0]],[[["positionalargument",3],["positionalargument",3]],["bool",0]],[[["clispecmetainfo",3],["clispecmetainfo",3]],["bool",0]],[[["clispec",3],["clispec",3]],["bool",0]],[[["cliparsed",3],["cliparsed",3]],["bool",0]],[[["parsererror",4],["formatter",3]],["result",6]],[[["parsererror",4],["formatter",3]],["result",4,[["error",3]]]],[[["command",4],["formatter",3]],["result",6]],[[["argumentoccurrence",4],["formatter",3]],["result",6]],[[["argumentvaluetype",4],["formatter",3]],["result",6]],[[["argumenthelp",4],["formatter",3]],["result",6]],[[["argument",3],["formatter",3]],["result",6]],[[["positionalargument",3],["formatter",3]],["result",6]],[[["clispecmetainfo",3],["formatter",3]],["result",6]],[[["clispec",3],["formatter",3]],["result",6]],[[["cliparsed",3],["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,[[["command",4],["command",4]],["bool",0]],[[["argumenthelp",4],["argumenthelp",4]],["bool",0]],[[["argument",3],["argument",3]],["bool",0]],[[["positionalargument",3],["positionalargument",3]],["bool",0]],[[["clispecmetainfo",3],["clispecmetainfo",3]],["bool",0]],[[["clispec",3],["clispec",3]],["bool",0]],[[["cliparsed",3],["cliparsed",3]],["bool",0]],[[],["clispecmetainfo",3]],[[],["clispec",3]],[[],["cliparsed",3]],null,null,[[["parsererror",4]],["option",4,[["error",8]]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],null,null,null,null,null,null,null,null,null,null,null],"p":[[4,"Command"],[4,"ParserError"],[4,"ArgumentOccurrence"],[4,"ArgumentValueType"],[4,"ArgumentHelp"],[3,"Argument"],[3,"CliParsed"],[3,"CliSpec"],[3,"CliSpecMetaInfo"],[3,"PositionalArgument"],[13,"Text"],[13,"TextAndParam"],[13,"Command"],[13,"SubCommand"],[13,"InvalidCommandLine"],[13,"InvalidCliSpec"],[13,"CommandDoesNotMatchSpec"],[13,"InternalError"]]}\ +"cliparser":{"doc":"cliparser","t":[5,5,5,5,5,0,5,3,4,4,4,3,3,3,4,13,13,13,13,13,13,13,13,4,3,13,13,13,13,13,11,11,11,12,12,12,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,12,12,11,11,11,11,11,11,11,11,11,11,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12],"n":["help","parse","parse_any","parse_process","parse_process_any","types","version","Argument","ArgumentHelp","ArgumentOccurrence","ArgumentValueType","CliParsed","CliSpec","CliSpecMetaInfo","Command","Command","CommandDoesNotMatchSpec","InternalError","InvalidCliSpec","InvalidCommandLine","Multiple","Multiple","None","ParserError","PositionalArgument","Single","Single","SubCommand","Text","TextAndParam","add_argument","add_command","add_subcommand","argument_occurrence","argument_values","arguments","arguments","author","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone","clone","clone","clone","clone","clone","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","clone_into","command","default","default","default","default_value","description","eq","eq","eq","eq","eq","eq","eq","eq","eq","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","fmt","from","from","from","from","from","from","from","from","from","from","get_first_value","help","help","help_post_text","into","into","into","into","into","into","into","into","into","into","key","meta_info","name","name","ne","ne","ne","ne","ne","ne","ne","new","new","new","positional_argument","project","set_meta_info","set_positional_argument","source","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_owned","to_string","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","type_id","value_type","version","0","0","1","0","0","0","0","0","0"],"q":["cliparser","","","","","","","cliparser::types","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","cliparser::types::ArgumentHelp","","","cliparser::types::Command","","cliparser::types::ParserError","","",""],"d":["Generates and returns the spec help text","Parsers the given command line based on the given spec and …","Parsers the given command line based on the given specs …","Parsers the given command line based on the given spec and …","Parsers the current process command line based on the …","types","Generates and returns the spec version text","Holds the command line argument spec","The argument help text","The argument occurrence type (see values for more info)","The argument value type (see values for more info)","Holds the command line parse result","Holds the command line spec (command/parameters/…)","Holds the command line spec meta information used to …","The command (not params) string/s","Single command (not sub command) such as: “ls”. Any …","Error Info Type","Error Info Type","Error Info Type","Error Info Type","The argument can appear multiple times. The value of each …","Allows multiple values (minimum one)","The argument does not accept any value","Holds the error information","Holds the positional argument spec","The argument can appear only once","Only single value is allowed","Sub command value such as: vec![“cargo”.to_string(), …","Text value","Text and variable name","Adds a Argument","Adds a command to the spec","Adds a sub command to the spec","The argument occurrence (see enum)","A map of all values for arguments found. The map will …","A list of all possible command line arguments.","A collection of all arguments found (list of names not …","Author name","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A list of all possible commands and sub commands.","","","","Default value if not found","Description string","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","returns the first value (if exists)","Help text","Help text","Post help text","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","All possible argument keys in the command line (for …","Meta information used for generating version and help …","Unique name for the argument later used to pull the parsed …","Unique name for the argument later used to pull the parsed …","","","","","","","","Returns new instance","Returns new instance","Returns new instance","The name of the argument that will hold all arguments …","Project name","Sets the spec meta info","Sets the PositionalArgument","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The possible value type for this specific argument","Version string","","","","","","","","",""],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,4,4,0,0,3,4,1,5,5,6,6,6,7,8,6,8,9,2,1,3,4,5,7,10,9,6,8,2,1,3,4,5,7,10,9,6,8,1,3,4,5,7,10,9,6,8,1,3,4,5,7,10,9,6,8,6,9,6,8,7,9,1,3,4,5,7,10,9,6,8,2,2,1,3,4,5,7,10,9,6,8,2,1,3,4,5,7,10,9,6,8,8,7,10,9,2,1,3,4,5,7,10,9,6,8,7,6,7,10,1,5,7,10,9,6,8,9,6,8,6,9,6,6,2,1,3,4,5,7,10,9,6,8,2,2,1,3,4,5,7,10,9,6,8,2,1,3,4,5,7,10,9,6,8,2,1,3,4,5,7,10,9,6,8,7,9,11,12,12,13,14,15,16,17,18],"f":[[[["clispec",3]],["string",3]],[[["vec",3],["clispec",3]],["result",4,[["cliparsed",3],["parsererror",4]]]],[[["vec",3],["vec",3,[["clispec",3]]]],["result",4,[["parsererror",4]]]],[[["clispec",3]],["result",4,[["cliparsed",3],["parsererror",4]]]],[[["vec",3,[["clispec",3]]]],["result",4,[["parsererror",4]]]],null,[[["clispec",3]],["string",3]],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[[["clispec",3],["argument",3]],["clispec",3]],[[["clispec",3],["str",0]],["clispec",3]],[[["clispec",3],["vec",3,[["str",0]]]],["clispec",3]],null,null,null,null,null,[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["",0]],["",0]],[[["command",4]],["command",4]],[[["argumentoccurrence",4]],["argumentoccurrence",4]],[[["argumentvaluetype",4]],["argumentvaluetype",4]],[[["argumenthelp",4]],["argumenthelp",4]],[[["argument",3]],["argument",3]],[[["positionalargument",3]],["positionalargument",3]],[[["clispecmetainfo",3]],["clispecmetainfo",3]],[[["clispec",3]],["clispec",3]],[[["cliparsed",3]],["cliparsed",3]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],[[["",0],["",0]]],null,[[],["clispecmetainfo",3]],[[],["clispec",3]],[[],["cliparsed",3]],null,null,[[["command",4],["command",4]],["bool",0]],[[["argumentoccurrence",4],["argumentoccurrence",4]],["bool",0]],[[["argumentvaluetype",4],["argumentvaluetype",4]],["bool",0]],[[["argumenthelp",4],["argumenthelp",4]],["bool",0]],[[["argument",3],["argument",3]],["bool",0]],[[["positionalargument",3],["positionalargument",3]],["bool",0]],[[["clispecmetainfo",3],["clispecmetainfo",3]],["bool",0]],[[["clispec",3],["clispec",3]],["bool",0]],[[["cliparsed",3],["cliparsed",3]],["bool",0]],[[["parsererror",4],["formatter",3]],["result",6]],[[["parsererror",4],["formatter",3]],["result",4,[["error",3]]]],[[["command",4],["formatter",3]],["result",6]],[[["argumentoccurrence",4],["formatter",3]],["result",6]],[[["argumentvaluetype",4],["formatter",3]],["result",6]],[[["argumenthelp",4],["formatter",3]],["result",6]],[[["argument",3],["formatter",3]],["result",6]],[[["positionalargument",3],["formatter",3]],["result",6]],[[["clispecmetainfo",3],["formatter",3]],["result",6]],[[["clispec",3],["formatter",3]],["result",6]],[[["cliparsed",3],["formatter",3]],["result",6]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["cliparsed",3],["str",0]],["option",4,[["string",3]]]],null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],null,null,null,null,[[["command",4],["command",4]],["bool",0]],[[["argumenthelp",4],["argumenthelp",4]],["bool",0]],[[["argument",3],["argument",3]],["bool",0]],[[["positionalargument",3],["positionalargument",3]],["bool",0]],[[["clispecmetainfo",3],["clispecmetainfo",3]],["bool",0]],[[["clispec",3],["clispec",3]],["bool",0]],[[["cliparsed",3],["cliparsed",3]],["bool",0]],[[],["clispecmetainfo",3]],[[],["clispec",3]],[[],["cliparsed",3]],null,null,[[["clispec",3],["option",4,[["clispecmetainfo",3]]]],["clispec",3]],[[["clispec",3],["option",4,[["positionalargument",3]]]],["clispec",3]],[[["parsererror",4]],["option",4,[["error",8]]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]]],[[["",0]],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],[[["",0]],["typeid",3]],null,null,null,null,null,null,null,null,null,null,null],"p":[[4,"Command"],[4,"ParserError"],[4,"ArgumentOccurrence"],[4,"ArgumentValueType"],[4,"ArgumentHelp"],[3,"CliSpec"],[3,"Argument"],[3,"CliParsed"],[3,"CliSpecMetaInfo"],[3,"PositionalArgument"],[13,"Text"],[13,"TextAndParam"],[13,"Command"],[13,"SubCommand"],[13,"InvalidCommandLine"],[13,"InvalidCliSpec"],[13,"CommandDoesNotMatchSpec"],[13,"InternalError"]]}\ }'); if (typeof window !== 'undefined' && window.initSearch) {window.initSearch(searchIndex)}; if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex}; diff --git a/docs/api/src/cliparser/help.rs.html b/docs/api/src/cliparser/help.rs.html index 04f51fc..9a6e357 100644 --- a/docs/api/src/cliparser/help.rs.html +++ b/docs/api/src/cliparser/help.rs.html @@ -236,6 +236,41 @@ 229 230 231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266
//! # help
 //!
 //! Generates help/version text based on given spec.
@@ -299,9 +334,15 @@
         buffer.push_str("\n\n");
     }
 
-    append_usage_line(spec, &mut buffer);
-    append_args_line(spec, &mut buffer);
-    append_options_block(spec, &mut buffer);
+    if append_usage_line(spec, &mut buffer) {
+        buffer.push_str("\n\n");
+    }
+    if append_args_line(spec, &mut buffer) {
+        buffer.push_str("\n\n");
+    }
+    if append_options_block(spec, &mut buffer) {
+        buffer.push_str("\n\n");
+    }
 
     match spec.meta_info {
         Some(ref meta_info) => match meta_info.help_post_text {
@@ -311,12 +352,15 @@
         None => (),
     }
 
-    buffer // todo fix this
+    buffer = buffer.trim().to_string();
+    buffer.push_str("\n");
+
+    buffer
 }
 
-fn append_usage_line(spec: &CliSpec, buffer: &mut String) {
+fn append_usage_line(spec: &CliSpec, buffer: &mut String) -> bool {
     if spec.command.is_empty() && spec.arguments.is_empty() && spec.positional_argument.is_none() {
-        return;
+        return false;
     }
 
     buffer.push_str("USAGE:\n    ");
@@ -361,9 +405,11 @@
         buffer.push_str(&name);
         buffer.push_str(">...]");
     }
+
+    true
 }
 
-fn append_args_line(spec: &CliSpec, buffer: &mut String) {
+fn append_args_line(spec: &CliSpec, buffer: &mut String) -> bool {
     if let Some(ref positional_argument_spec) = spec.positional_argument {
         let name = get_positional_argument_value_name(positional_argument_spec);
 
@@ -379,10 +425,14 @@
                 ArgumentHelp::TextAndParam(text, _) => buffer.push_str(text),
             }
         }
+
+        true
+    } else {
+        false
     }
 }
 
-fn append_options_block(spec: &CliSpec, buffer: &mut String) {
+fn append_options_block(spec: &CliSpec, buffer: &mut String) -> bool {
     if !spec.arguments.is_empty() {
         let mut names = vec![];
         let mut max_width = 0;
@@ -423,22 +473,42 @@
             }
 
             let help_text = match argument.help {
-                Some(ref help) => match help {
-                    ArgumentHelp::Text(ref text) => text.to_string(),
-                    ArgumentHelp::TextAndParam(ref text, _) => text.to_string(),
-                },
+                Some(ref help) => {
+                    let mut text = match help {
+                        ArgumentHelp::Text(ref text) => text.to_string(),
+                        ArgumentHelp::TextAndParam(ref text, _) => text.to_string(),
+                    };
+                    if !text.is_empty() {
+                        text.push_str(" ");
+                    }
+
+                    text
+                }
                 None => "".to_string(),
             };
 
+            let default_text = match argument.value_type {
+                ArgumentValueType::None => "".to_string(),
+                _ => match argument.default_value {
+                    Some(ref value) => format!("[default: {}]", value),
+                    None => "".to_string(),
+                },
+            };
+
             let line = format!(
-                "{:<help_offset$}{}",
+                "{:<help_offset$}{}{}",
                 &names[index],
                 &help_text,
+                &default_text,
                 help_offset = help_offset
             );
             buffer.push_str(&line.trim_end());
             index = index + 1;
         }
+
+        true
+    } else {
+        false
     }
 }
 
diff --git a/docs/api/src/cliparser/lib.rs.html b/docs/api/src/cliparser/lib.rs.html
index 1cb7d49..a0a3b56 100644
--- a/docs/api/src/cliparser/lib.rs.html
+++ b/docs/api/src/cliparser/lib.rs.html
@@ -568,28 +568,6 @@
 561
 562
 563
-564
-565
-566
-567
-568
-569
-570
-571
-572
-573
-574
-575
-576
-577
-578
-579
-580
-581
-582
-583
-584
-585
 
#![deny(
     absolute_paths_not_starting_with_crate,
     ambiguous_associated_items,
@@ -764,109 +742,98 @@
 //!     let mut cli_spec = CliSpec::new();
 //!
 //!     // Add meta info to support help and version text generation
-//!     cli_spec.meta_info = Some(CliSpecMetaInfo {
-//!         author: Some("Sagie Gur-Ari".to_string()),
-//!         version: Some("1.2.3-beta".to_string()),
-//!         description: Some("Amazing example".to_string()),
-//!         project: Some("example".to_string()),
-//!         help_post_text: Some(
-//!             "See more info at: https://github.com/sagiegurari/cargo-make".to_string(),
-//!         ),
-//!     });
-//!
-//!     // Define the prefix of the arguments.
-//!     // It can be a command/s (path prefix ignored) and/or a sub command/s
-//!     // If not defined, the parsing will start checking the arguments only.
-//!     // In this example, the spec defines two ways to invoke a process, either
-//!     // as 'makers' or as 'cargo make' and afterwards the arguments.
-//!     cli_spec
-//!         .command
-//!         .push(Command::Command("makers".to_string()));
-//!     cli_spec.command.push(Command::SubCommand(vec![
-//!         "cargo".to_string(),
-//!         "make".to_string(),
-//!     ]));
-//!
-//!     // Positional arguments come after all the known argument keys.
-//!     // If the positional is None, positional arguments are not allowed.
-//!     // Add -- to the command line forces positional arguments and stops key
-//!     // based argument parsing.
-//!     cli_spec.positional_argument = Some(PositionalArgument {
-//!         name: "args".to_string(),
-//!         help: Some(ArgumentHelp::TextAndParam(
-//!             "The command line arguments".to_string(),
-//!             "ARGS".to_string(),
-//!         )),
-//!     });
-//!
-//!     // Add a 'flag' only argument which is an argument that does not accept any value.
-//!     // You can define multiple variations of the parameter name.
-//!     // For example, in this case putting --flag or -f in the command line would be parsed
-//!     // as the 'flag' parameter.
-//!     cli_spec.arguments.push(Argument {
-//!         name: "flag".to_string(),
-//!         key: vec!["--flag".to_string(), "-f".to_string()],
-//!         argument_occurrence: ArgumentOccurrence::Single,
-//!         value_type: ArgumentValueType::None,
-//!         default_value: None,
-//!         help: Some(ArgumentHelp::Text(
-//!             "A flag without value example".to_string(),
-//!         )),
-//!     });
-//!
-//!     // Add an argument that accepts a single value, for example -s value
-//!     cli_spec.arguments.push(Argument {
-//!         name: "single".to_string(),
-//!         key: vec!["--s1".to_string(), "-s".to_string()],
-//!         argument_occurrence: ArgumentOccurrence::Single,
-//!         value_type: ArgumentValueType::Single,
-//!         default_value: None,
-//!         help: Some(ArgumentHelp::Text(
-//!             "A parameter with single value example".to_string(),
-//!         )),
-//!     });
-//!
-//!     // Add an argument that accepts multiple values
-//!     cli_spec.arguments.push(Argument {
-//!         name: "mo".to_string(),
-//!         key: vec!["--mo1".to_string(), "-mo2".to_string()],
-//!         argument_occurrence: ArgumentOccurrence::Multiple,
-//!         value_type: ArgumentValueType::Single,
-//!         default_value: None,
-//!         help: Some(ArgumentHelp::Text(
-//!             "A parameter with multiple values example".to_string(),
-//!         )),
-//!     });
-//!
-//!     // Add an argument that can appear multiple times.
-//!     // Even if the value type if Single, multiple occurrences will
-//!     // enable the argument to collect multiple values (one for each occurrence).
-//!     cli_spec.arguments.push(Argument {
-//!         name: "mv".to_string(),
-//!         key: vec!["--mv1".to_string(), "-mv2".to_string()],
-//!         argument_occurrence: ArgumentOccurrence::Single,
-//!         value_type: ArgumentValueType::Multiple,
-//!         default_value: None,
-//!         help: Some(ArgumentHelp::Text(
-//!             "A parameter with single value but can appear multiple times example".to_string(),
-//!         )),
-//!     });
-//!
-//!     // We can define a 'default' value.
-//!     // In case the argument is not in the command line, we will get the default value.
-//!     // However, the argument names list in the parsed struct will not include this
-//!     // argument as it was not found. Only the argument values will contain it.
-//!     // This is a good way to understand that we have a value but it was not entered by the caller.
-//!     cli_spec.arguments.push(Argument {
-//!         name: "default".to_string(),
-//!         key: vec!["--d1".to_string(), "-d".to_string()],
-//!         argument_occurrence: ArgumentOccurrence::Single,
-//!         value_type: ArgumentValueType::Single,
-//!         default_value: Some("some default".to_string()),
-//!         help: Some(ArgumentHelp::Text(
-//!             "A parameter with default value example".to_string(),
-//!         )),
-//!     });
+//!     cli_spec = cli_spec
+//!         .set_meta_info(Some(CliSpecMetaInfo {
+//!             author: Some("Sagie Gur-Ari".to_string()),
+//!             version: Some("1.2.3-beta".to_string()),
+//!             description: Some("Amazing example".to_string()),
+//!             project: Some("example".to_string()),
+//!             help_post_text: Some(
+//!                 "See more info at: https://github.com/sagiegurari/cargo-make".to_string(),
+//!             ),
+//!         }))
+//!         // Define the prefix of the arguments.
+//!         // It can be a command/s (path prefix ignored) and/or a sub command/s
+//!         // If not defined, the parsing will start checking the arguments only.
+//!         // In this example, the spec defines two ways to invoke a process, either
+//!         // as 'makers' or as 'cargo make' and afterwards the arguments.
+//!         .add_command("makers")
+//!         .add_subcommand(vec!["cargo", "make"])
+//!         // Positional arguments come after all the known argument keys.
+//!         // If the positional is None, positional arguments are not allowed.
+//!         // Add -- to the command line forces positional arguments and stops key
+//!         // based argument parsing.
+//!         .set_positional_argument(Some(PositionalArgument {
+//!             name: "args".to_string(),
+//!             help: Some(ArgumentHelp::TextAndParam(
+//!                 "The command line arguments".to_string(),
+//!                 "ARGS".to_string(),
+//!             )),
+//!         }))
+//!         // Add a 'flag' only argument which is an argument that does not accept any value.
+//!         // You can define multiple variations of the parameter name.
+//!         // For example, in this case putting --flag or -f in the command line would be parsed
+//!         // as the 'flag' parameter.
+//!         .add_argument(Argument {
+//!             name: "flag".to_string(),
+//!             key: vec!["--flag".to_string(), "-f".to_string()],
+//!             argument_occurrence: ArgumentOccurrence::Single,
+//!             value_type: ArgumentValueType::None,
+//!             default_value: None,
+//!             help: Some(ArgumentHelp::Text(
+//!                 "A flag without value example".to_string(),
+//!             )),
+//!         })
+//!         // Add an argument that accepts a single value, for example -s value
+//!         .add_argument(Argument {
+//!             name: "single".to_string(),
+//!             key: vec!["--s1".to_string(), "-s".to_string()],
+//!             argument_occurrence: ArgumentOccurrence::Single,
+//!             value_type: ArgumentValueType::Single,
+//!             default_value: None,
+//!             help: Some(ArgumentHelp::Text(
+//!                 "A parameter with single value example".to_string(),
+//!             )),
+//!         })
+//!         // Add an argument that accepts multiple values
+//!         .add_argument(Argument {
+//!             name: "mo".to_string(),
+//!             key: vec!["--mo1".to_string(), "-mo2".to_string()],
+//!             argument_occurrence: ArgumentOccurrence::Multiple,
+//!             value_type: ArgumentValueType::Single,
+//!             default_value: None,
+//!             help: Some(ArgumentHelp::Text(
+//!                 "A parameter with multiple values example".to_string(),
+//!             )),
+//!         })
+//!         // Add an argument that can appear multiple times.
+//!         // Even if the value type if Single, multiple occurrences will
+//!         // enable the argument to collect multiple values (one for each occurrence).
+//!         .add_argument(Argument {
+//!             name: "mv".to_string(),
+//!             key: vec!["--mv1".to_string(), "-mv2".to_string()],
+//!             argument_occurrence: ArgumentOccurrence::Single,
+//!             value_type: ArgumentValueType::Multiple,
+//!             default_value: None,
+//!             help: Some(ArgumentHelp::Text(
+//!                 "A parameter with single value but can appear multiple times example".to_string(),
+//!             )),
+//!         })
+//!         // We can define a 'default' value.
+//!         // In case the argument is not in the command line, we will get the default value.
+//!         // However, the argument names list in the parsed struct will not include this
+//!         // argument as it was not found. Only the argument values will contain it.
+//!         // This is a good way to understand that we have a value but it was not entered by the caller.
+//!         .add_argument(Argument {
+//!             name: "default".to_string(),
+//!             key: vec!["--d1".to_string(), "-d".to_string()],
+//!             argument_occurrence: ArgumentOccurrence::Single,
+//!             value_type: ArgumentValueType::Single,
+//!             default_value: Some("some default".to_string()),
+//!             help: Some(ArgumentHelp::Text(
+//!                 "A parameter with default value example".to_string(),
+//!             )),
+//!         });
 //!
 //!     // Parsers the given command line based on the given spec and returns the result.
 //!     // In case of invalid input or the provided spec does not match the command line, an error will be returned.
@@ -875,7 +842,7 @@
 //!     // which fits is found, use the parse_any and parse_process_any functions.
 //!     let result = parse(
 //!         &vec![
-//!             "cargo", "make", "-mv2", "4", "5", "6", "--mo1", "1", "-mo2", "2", "-f", "-s", "3",
+//!             "cargo", "make", "-mv2", "4", "5", "6", "--mo1=1", "-mo2", "2", "-f", "-s", "3",
 //!             "arg1", "arg2", "-mo2", "arg5",
 //!         ],
 //!         &cli_spec,
@@ -976,109 +943,98 @@
 ///     let mut cli_spec = CliSpec::new();
 ///
 ///     // Add meta info to support help and version text generation
-///     cli_spec.meta_info = Some(CliSpecMetaInfo {
-///         author: Some("Sagie Gur-Ari".to_string()),
-///         version: Some("1.2.3-beta".to_string()),
-///         description: Some("Amazing example".to_string()),
-///         project: Some("example".to_string()),
-///         help_post_text: Some(
-///             "See more info at: https://github.com/sagiegurari/cargo-make".to_string(),
-///         ),
-///     });
-///
-///     // Define the prefix of the arguments.
-///     // It can be a command/s (path prefix ignored) and/or a sub command/s
-///     // If not defined, the parsing will start checking the arguments only.
-///     // In this example, the spec defines two ways to invoke a process, either
-///     // as 'makers' or as 'cargo make' and afterwards the arguments.
-///     cli_spec
-///         .command
-///         .push(Command::Command("makers".to_string()));
-///     cli_spec.command.push(Command::SubCommand(vec![
-///         "cargo".to_string(),
-///         "make".to_string(),
-///     ]));
-///
-///     // Positional arguments come after all the known argument keys.
-///     // If the positional is None, positional arguments are not allowed.
-///     // Add -- to the command line forces positional arguments and stops key
-///     // based argument parsing.
-///     cli_spec.positional_argument = Some(PositionalArgument {
-///         name: "args".to_string(),
-///         help: Some(ArgumentHelp::TextAndParam(
-///             "The command line arguments".to_string(),
-///             "ARGS".to_string(),
-///         )),
-///     });
-///
-///     // Add a 'flag' only argument which is an argument that does not accept any value.
-///     // You can define multiple variations of the parameter name.
-///     // For example, in this case putting --flag or -f in the command line would be parsed
-///     // as the 'flag' parameter.
-///     cli_spec.arguments.push(Argument {
-///         name: "flag".to_string(),
-///         key: vec!["--flag".to_string(), "-f".to_string()],
-///         argument_occurrence: ArgumentOccurrence::Single,
-///         value_type: ArgumentValueType::None,
-///         default_value: None,
-///         help: Some(ArgumentHelp::Text(
-///             "A flag without value example".to_string(),
-///         )),
-///     });
-///
-///     // Add an argument that accepts a single value, for example -s value
-///     cli_spec.arguments.push(Argument {
-///         name: "single".to_string(),
-///         key: vec!["--s1".to_string(), "-s".to_string()],
-///         argument_occurrence: ArgumentOccurrence::Single,
-///         value_type: ArgumentValueType::Single,
-///         default_value: None,
-///         help: Some(ArgumentHelp::Text(
-///             "A parameter with single value example".to_string(),
-///         )),
-///     });
-///
-///     // Add an argument that accepts multiple values
-///     cli_spec.arguments.push(Argument {
-///         name: "mo".to_string(),
-///         key: vec!["--mo1".to_string(), "-mo2".to_string()],
-///         argument_occurrence: ArgumentOccurrence::Multiple,
-///         value_type: ArgumentValueType::Single,
-///         default_value: None,
-///         help: Some(ArgumentHelp::Text(
-///             "A parameter with multiple values example".to_string(),
-///         )),
-///     });
-///
-///     // Add an argument that can appear multiple times.
-///     // Even if the value type if Single, multiple occurrences will
-///     // enable the argument to collect multiple values (one for each occurrence).
-///     cli_spec.arguments.push(Argument {
-///         name: "mv".to_string(),
-///         key: vec!["--mv1".to_string(), "-mv2".to_string()],
-///         argument_occurrence: ArgumentOccurrence::Single,
-///         value_type: ArgumentValueType::Multiple,
-///         default_value: None,
-///         help: Some(ArgumentHelp::Text(
-///             "A parameter with single value but can appear multiple times example".to_string(),
-///         )),
-///     });
-///
-///     // We can define a 'default' value.
-///     // In case the argument is not in the command line, we will get the default value.
-///     // However, the argument names list in the parsed struct will not include this
-///     // argument as it was not found. Only the argument values will contain it.
-///     // This is a good way to understand that we have a value but it was not entered by the caller.
-///     cli_spec.arguments.push(Argument {
-///         name: "default".to_string(),
-///         key: vec!["--d1".to_string(), "-d".to_string()],
-///         argument_occurrence: ArgumentOccurrence::Single,
-///         value_type: ArgumentValueType::Single,
-///         default_value: Some("some default".to_string()),
-///         help: Some(ArgumentHelp::Text(
-///             "A parameter with default value example".to_string(),
-///         )),
-///     });
+///     cli_spec = cli_spec
+///         .set_meta_info(Some(CliSpecMetaInfo {
+///             author: Some("Sagie Gur-Ari".to_string()),
+///             version: Some("1.2.3-beta".to_string()),
+///             description: Some("Amazing example".to_string()),
+///             project: Some("example".to_string()),
+///             help_post_text: Some(
+///                 "See more info at: https://github.com/sagiegurari/cargo-make".to_string(),
+///             ),
+///         }))
+///         // Define the prefix of the arguments.
+///         // It can be a command/s (path prefix ignored) and/or a sub command/s
+///         // If not defined, the parsing will start checking the arguments only.
+///         // In this example, the spec defines two ways to invoke a process, either
+///         // as 'makers' or as 'cargo make' and afterwards the arguments.
+///         .add_command("makers")
+///         .add_subcommand(vec!["cargo", "make"])
+///         // Positional arguments come after all the known argument keys.
+///         // If the positional is None, positional arguments are not allowed.
+///         // Add -- to the command line forces positional arguments and stops key
+///         // based argument parsing.
+///         .set_positional_argument(Some(PositionalArgument {
+///             name: "args".to_string(),
+///             help: Some(ArgumentHelp::TextAndParam(
+///                 "The command line arguments".to_string(),
+///                 "ARGS".to_string(),
+///             )),
+///         }))
+///         // Add a 'flag' only argument which is an argument that does not accept any value.
+///         // You can define multiple variations of the parameter name.
+///         // For example, in this case putting --flag or -f in the command line would be parsed
+///         // as the 'flag' parameter.
+///         .add_argument(Argument {
+///             name: "flag".to_string(),
+///             key: vec!["--flag".to_string(), "-f".to_string()],
+///             argument_occurrence: ArgumentOccurrence::Single,
+///             value_type: ArgumentValueType::None,
+///             default_value: None,
+///             help: Some(ArgumentHelp::Text(
+///                 "A flag without value example".to_string(),
+///             )),
+///         })
+///         // Add an argument that accepts a single value, for example -s value
+///         .add_argument(Argument {
+///             name: "single".to_string(),
+///             key: vec!["--s1".to_string(), "-s".to_string()],
+///             argument_occurrence: ArgumentOccurrence::Single,
+///             value_type: ArgumentValueType::Single,
+///             default_value: None,
+///             help: Some(ArgumentHelp::Text(
+///                 "A parameter with single value example".to_string(),
+///             )),
+///         })
+///         // Add an argument that accepts multiple values
+///         .add_argument(Argument {
+///             name: "mo".to_string(),
+///             key: vec!["--mo1".to_string(), "-mo2".to_string()],
+///             argument_occurrence: ArgumentOccurrence::Multiple,
+///             value_type: ArgumentValueType::Single,
+///             default_value: None,
+///             help: Some(ArgumentHelp::Text(
+///                 "A parameter with multiple values example".to_string(),
+///             )),
+///         })
+///         // Add an argument that can appear multiple times.
+///         // Even if the value type if Single, multiple occurrences will
+///         // enable the argument to collect multiple values (one for each occurrence).
+///         .add_argument(Argument {
+///             name: "mv".to_string(),
+///             key: vec!["--mv1".to_string(), "-mv2".to_string()],
+///             argument_occurrence: ArgumentOccurrence::Single,
+///             value_type: ArgumentValueType::Multiple,
+///             default_value: None,
+///             help: Some(ArgumentHelp::Text(
+///                 "A parameter with single value but can appear multiple times example".to_string(),
+///             )),
+///         })
+///         // We can define a 'default' value.
+///         // In case the argument is not in the command line, we will get the default value.
+///         // However, the argument names list in the parsed struct will not include this
+///         // argument as it was not found. Only the argument values will contain it.
+///         // This is a good way to understand that we have a value but it was not entered by the caller.
+///         .add_argument(Argument {
+///             name: "default".to_string(),
+///             key: vec!["--d1".to_string(), "-d".to_string()],
+///             argument_occurrence: ArgumentOccurrence::Single,
+///             value_type: ArgumentValueType::Single,
+///             default_value: Some("some default".to_string()),
+///             help: Some(ArgumentHelp::Text(
+///                 "A parameter with default value example".to_string(),
+///             )),
+///         });
 ///
 ///     // Parsers the given command line based on the given spec and returns the result.
 ///     // In case of invalid input or the provided spec does not match the command line, an error will be returned.
@@ -1087,7 +1043,7 @@
 ///     // which fits is found, use the parse_any and parse_process_any functions.
 ///     let result = parse(
 ///         &vec![
-///             "cargo", "make", "-mv2", "4", "5", "6", "--mo1", "1", "-mo2", "2", "-f", "-s", "3",
+///             "cargo", "make", "-mv2", "4", "5", "6", "--mo1=1", "-mo2", "2", "-f", "-s", "3",
 ///             "arg1", "arg2", "-mo2", "arg5",
 ///         ],
 ///         &cli_spec,
diff --git a/docs/api/src/cliparser/parser.rs.html b/docs/api/src/cliparser/parser.rs.html
index f4b1c67..0b21c0f 100644
--- a/docs/api/src/cliparser/parser.rs.html
+++ b/docs/api/src/cliparser/parser.rs.html
@@ -375,6 +375,46 @@
 368
 369
 370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
 
//! # parser
 //!
 //! Parsers arguments line based on given spec and returned parsed data.
@@ -402,7 +442,11 @@
     let (valid, args_start_index) = parse_command(&command_line, spec);
     if !valid {
         return Err(ParserError::InvalidCommandLine(
-            "Command does not match spec".to_string(),
+            format!(
+                "Command does not match spec, command line: {:?}",
+                command_line
+            )
+            .to_string(),
         ));
     }
 
@@ -585,11 +629,27 @@
 
             // search for argument in arguments spec
             let mut argument_spec_found = None;
+            let argument_key_value_parts = argument_raw.split_once("=");
+            let mut argument_with_value = false;
             for argument_spec in &spec.arguments {
                 for key in &argument_spec.key {
                     if key == argument_raw {
                         argument_spec_found = Some(argument_spec);
                         break;
+                    } else {
+                        if argument_spec.value_type == ArgumentValueType::Single {
+                            match argument_key_value_parts {
+                                Some(ref parts) => {
+                                    let (key_prefix, _) = parts;
+                                    if key == key_prefix {
+                                        argument_spec_found = Some(argument_spec);
+                                        argument_with_value = true;
+                                        break;
+                                    }
+                                }
+                                None => (),
+                            }
+                        }
                     }
                 }
             }
@@ -617,6 +677,16 @@
                             }
                             ArgumentValueType::None => (),
                         }
+
+                        if argument_with_value {
+                            let (_, value_part) = argument_key_value_parts.unwrap();
+                            insert_argument_value(
+                                cli_parsed,
+                                &found_argument_spec.name,
+                                value_part,
+                            );
+                            argument_spec_in_scope = None;
+                        }
                     }
                     None => {
                         // current value is not a new argument key and we are currently in multi value key so
@@ -656,6 +726,16 @@
                             }
                             ArgumentValueType::None => (),
                         }
+
+                        if argument_with_value {
+                            let (_, value_part) = argument_key_value_parts.unwrap();
+                            insert_argument_value(
+                                cli_parsed,
+                                &found_argument_spec.name,
+                                value_part,
+                            );
+                            argument_spec_in_scope = None;
+                        }
                     }
                     None => match positional_argument_name {
                         // current value is not a new argument key and we are not in a scope of some argument
diff --git a/docs/api/src/cliparser/types.rs.html b/docs/api/src/cliparser/types.rs.html
index 05148ba..0c97eb0 100644
--- a/docs/api/src/cliparser/types.rs.html
+++ b/docs/api/src/cliparser/types.rs.html
@@ -185,6 +185,52 @@
 178
 179
 180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
 
//! # types
 //!
 //! Defines the various types.
@@ -343,6 +389,37 @@
     pub fn new() -> CliSpec {
         Default::default()
     }
+
+    /// Sets the spec meta info
+    pub fn set_meta_info(mut self, meta_info: Option<CliSpecMetaInfo>) -> Self {
+        self.meta_info = meta_info;
+        self
+    }
+
+    /// Adds a command to the spec
+    pub fn add_command(mut self, command: &str) -> Self {
+        self.command.push(Command::Command(command.to_string()));
+        self
+    }
+
+    /// Adds a sub command to the spec
+    pub fn add_subcommand(mut self, sub_command: Vec<&str>) -> Self {
+        let string_vec = sub_command.iter().map(|value| value.to_string()).collect();
+        self.command.push(Command::SubCommand(string_vec));
+        self
+    }
+
+    /// Sets the PositionalArgument
+    pub fn set_positional_argument(mut self, argument: Option<PositionalArgument>) -> Self {
+        self.positional_argument = argument;
+        self
+    }
+
+    /// Adds a Argument
+    pub fn add_argument(mut self, argument: Argument) -> Self {
+        self.arguments.push(argument);
+        self
+    }
 }
 
 #[derive(Debug, Clone, PartialEq, Default)]
@@ -364,6 +441,21 @@
     pub fn new() -> CliParsed {
         Default::default()
     }
+
+    /// returns the first value (if exists)
+    pub fn get_first_value(&self, key: &str) -> Option<String> {
+        match self.argument_values.get(key) {
+            Some(ref values) => {
+                if values.len() == 0 {
+                    None
+                } else {
+                    let first_value = values.first().clone().unwrap();
+                    Some(first_value.to_string())
+                }
+            }
+            None => None,
+        }
+    }
 }