Repository: kbknapp/clap-rs
Pull request #1028 (2017-08-15 02:46:46)

chore: adds a sponsors file


<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/kbknapp/clap-rs/1028)
<!-- Reviewable:end -->



Patch:
diff --git a/README.md b/README.md
index 02ec05dc..e1ec668c 100644
--- a/README.md
+++ b/README.md
@@ -144,7 +144,7 @@ I first want to say I'm a big a fan of BurntSushi's work, the creator of `Docopt
 
 `docopt` is also excellent at translating arguments into Rust types automatically. There is even a syntax extension which will do all this for you, if you're willing to use a nightly compiler (use of a stable compiler requires you to somewhat manually translate from arguments to Rust types). To use BurntSushi's words, `docopt` is also a sort of black box. You get what you get, and it's hard to tweak implementation or customize the experience for your use case.
 
-Because `docopt` is doing a ton of work to parse your help messages and determine what you were trying to communicate as valid arguments, it's also one of the more heavy weight parsers performance-wise. For most applications this isn't a concern and this isn't to say `docopt` is slow, in fact far from it. This is just something to keep in mind while comparing.
+Because `docopt` is doing a ton of work to parse your help messages and determine what you were trying to communicate as valid arguments, it's also one of the more heavy weight parsers performance-wise. For most applications this isn't a concern and this isn't to say `docopt` is slow, in fact from it. This is just something to keep in mind while comparing.
 
 #### All else being equal, what are some reasons to use `clap`?
 
diff --git a/SPONSORS.md b/SPONSORS.md
new file mode 100644
index 00000000..397e005a
--- /dev/null
+++ b/SPONSORS.md
@@ -0,0 +1,7 @@
+The following is a list of [sponsors](https://www.clap.rs/sponsor/) for the clap-rs project:
+
+[<img alt="Noelia Seva-Gonzalez" src="https://www.clap.rs/sponsor/img/noelia_sm.png" width="117">](http://vsgrealestategroup.com.realproserver.com/About)
+Noelia Seva-Gonzalez
+
+[<img alt="Rob Tsuk" src="https://www.clap.rs/sponsor/img/robtsuk_sm.png" width="117">](https://github.com/rtsuk)
+Rob Tsuk
\ No newline at end of file
diff --git a/src/args/arg.rs b/src/args/arg.rs
index 77771da8..9e81911f 100644
--- a/src/args/arg.rs
+++ b/src/args/arg.rs
@@ -1507,7 +1507,7 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// assert!(res.is_ok()); // We didn't use --other=special, so "cfg" wasn't required
     /// ```
     ///
-    /// Setting [`Arg::required_if(arg, val)`] and having `arg` used with a value of `val` but *not*
+    /// Setting [`Arg::required_if(arg, val)`] and having `arg` used with a vaue of `val` but *not*
     /// using this arg is an error.
     ///
     /// ```rust
@@ -1591,7 +1591,7 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// ```
     ///
     /// Setting [`Arg::required_ifs(&[(arg, val)])`] and having any of the `arg`s used with it's
-    /// value of `val` but *not* using this arg is an error.
+    /// vaue of `val` but *not* using this arg is an error.
     ///
     /// ```rust
     /// # use clap::{App, Arg, ErrorKind};
@@ -2054,7 +2054,7 @@ impl<'a, 'b> Arg<'a, 'b> {
     /// **NOTE:** This setting only applies to [options] and [positional arguments]
     ///
     /// **NOTE:** When the terminator is passed in on the command line, it is **not** stored as one
-    /// of the values
+    /// of the vaues
     ///
     /// # Examples
     ///
diff --git a/src/suggestions.rs b/src/suggestions.rs
index cd18d4a2..bf586def 100644
--- a/src/suggestions.rs
+++ b/src/suggestions.rs
@@ -58,10 +58,9 @@ pub fn did_you_mean_flag_suffix<'z, T, I>(arg: &str, longs: I, subcommands: &'z
 
                 if let Some(candidate) = did_you_mean(arg, opts) {
                     let suffix = format!(
-                        "\n\tDid you mean to put '{}{}' after the subcommand '{}'?",
-                        Format::Good("--"),
-                        Format::Good(candidate),
-                        Format::Good(subcommand.get_name()));
+                        "\n\tDid you mean to put '--{}' after the subcommand '{}'?",
+                        Format::Good(arg),
+                        Format::Good(candidate));
                     return (suffix, Some(candidate));
                 }
             }


Test patch:
diff --git a/tests/subcommands.rs b/tests/subcommands.rs
index 488ffe01..78d39cde 100644
--- a/tests/subcommands.rs
+++ b/tests/subcommands.rs
@@ -43,8 +43,8 @@ USAGE:
 For more information try --help";
 
 #[cfg(feature = "suggestions")]
-static DYM2: &'static str = "error: Found argument '--subcm' which wasn't expected, or isn't valid in this context
-\tDid you mean to put '--subcmdarg' after the subcommand 'subcmd'?
+static DYM2: &'static str = "error: Found argument '--subcmdarg' which wasn't expected, or isn't valid in this context
+\tDid you mean to put '--subcmdarg' after the subcommand 'subcmdarg'?
 
 USAGE:
     clap-test [FLAGS] [OPTIONS] [ARGS] [SUBCOMMAND]
@@ -130,7 +130,7 @@ fn multiple_aliases() {
 #[cfg(feature="suggestions")]
 fn subcmd_did_you_mean_output() {
     assert!(test::compare_output(test::complex_app(), "clap-test subcm", DYM, true));
-    assert!(test::compare_output(test::complex_app(), "clap-test --subcm foo", DYM2, true));
+    assert!(test::compare_output(test::complex_app(), "clap-test --subcmdarg foo", DYM2, true));
 }
 
 #[test]