From 354cefd27440d8dafb66d6ea7ed47f16c52267b1 Mon Sep 17 00:00:00 2001 From: Jaanus Varus Date: Thu, 18 Jan 2018 13:20:02 +0100 Subject: [PATCH 1/4] Fix typos in 03_args.rs --- examples/03_args.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/03_args.rs b/examples/03_args.rs index fa003a24..c62d5763 100644 --- a/examples/03_args.rs +++ b/examples/03_args.rs @@ -21,9 +21,9 @@ fn main() { // so that you know right away an error was made by the developer, not the end user. // // # Help and Version - // clap automatically generates a help and version flag for you, unless you specificy your + // clap automatically generates a help and version flag for you, unless you specify your // own. By default help uses "-h" and "--help", and version uses "-V" and "--version". You can - // safely overide "-V" and "-h" to your own arguments, and "--help" and "--version" will stil + // safely override "-V" and "-h" to your own arguments, and "--help" and "--version" will still // be automatically generated for you. let matches = App::new("MyApp") // All application settings go here... @@ -47,7 +47,7 @@ fn main() { .required(true) ]) - // *Note* the following two examples are convienience methods, if you wish + // *Note* the following two examples are convenience methods, if you wish // to still get the full configurability of Arg::with_name() and the readability // of arg_from_usage(), you can instantiate a new Arg with Arg::from_usage() and // still be able to set all the additional properties, just like Arg::with_name() @@ -79,6 +79,6 @@ fn main() { // We could continue checking for and using arguments in this manner, such as "license", // "output", and "interface". Keep in mind that "output" and "interface" are optional, so you - // shouldn't call .unwrap(), instead prefer using an 'if let' expression as we did with + // shouldn't call .unwrap(). Instead, prefer using an 'if let' expression as we did with // "config" } From 8aa3c573519ce8ba7a33afe35371626323ec975d Mon Sep 17 00:00:00 2001 From: discosultan Date: Thu, 18 Jan 2018 14:16:15 +0100 Subject: [PATCH 2/4] Fix typo in 07_option_args.rs --- examples/07_option_args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/07_option_args.rs b/examples/07_option_args.rs index 16605458..e23b4820 100644 --- a/examples/07_option_args.rs +++ b/examples/07_option_args.rs @@ -13,7 +13,7 @@ fn main() { // Regular App configuration goes here... // Assume we an application that accepts an input file via the "-i file" - // or the "--input file" (as wel as "--input=file"). + // or the "--input file" (as well as "--input=file"). // Below every setting supported by option arguments is discussed. // NOTE: You DO NOT need to specify each setting, only those which apply // to your particular case. From 67e937acf7ac075bdde09dd3fa08abd7e1b87f37 Mon Sep 17 00:00:00 2001 From: discosultan Date: Thu, 18 Jan 2018 14:21:02 +0100 Subject: [PATCH 3/4] Fix typo in 07_option_args.rs --- examples/07_option_args.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/07_option_args.rs b/examples/07_option_args.rs index e23b4820..1af55fd7 100644 --- a/examples/07_option_args.rs +++ b/examples/07_option_args.rs @@ -12,7 +12,7 @@ fn main() { let matches = App::new("MyApp") // Regular App configuration goes here... - // Assume we an application that accepts an input file via the "-i file" + // Assume we have an application that accepts an input file via the "-i file" // or the "--input file" (as well as "--input=file"). // Below every setting supported by option arguments is discussed. // NOTE: You DO NOT need to specify each setting, only those which apply From 61cf3f9142924cf12f2b35d24dde5ac6169e938a Mon Sep 17 00:00:00 2001 From: discosultan Date: Thu, 18 Jan 2018 15:46:20 +0100 Subject: [PATCH 4/4] Fix typo in arg.rs --- src/args/arg.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/args/arg.rs b/src/args/arg.rs index 92a5e762..bdcd63a5 100644 --- a/src/args/arg.rs +++ b/src/args/arg.rs @@ -822,14 +822,14 @@ impl<'a, 'b> Arg<'a, 'b> { /// Allows values which start with a leading hyphen (`-`) /// - /// **WARNING**: Take caution when using this setting, combined with [`Arg::multiple(true)`] as - /// it this becomes ambigous `$ prog --arg -- -- val`. All three `--, --, val` will be values + /// **WARNING**: Take caution when using this setting combined with [`Arg::multiple(true)`], as + /// this becomes ambiguous `$ prog --arg -- -- val`. All three `--, --, val` will be values /// when the user may have thought the second `--` would constitute the normal, "Only /// positional args follow" idiom. To fix this, consider using [`Arg::number_of_values(1)`] /// /// **WARNING**: When building your CLIs, consider the effects of allowing leading hyphens and /// the user passing in a value that matches a valid short. For example `prog -opt -F` where - /// `-F` is supposed to be a value, yet `-F` is *also* a valid short for anther arg. Care should + /// `-F` is supposed to be a value, yet `-F` is *also* a valid short for another arg. Care should /// should be taken when designing these args. This is compounded by the ability to "stack" /// short args. I.e. if `-val` is supposed to be a value, but `-v`, `-a`, and `-l` are all valid /// shorts.