Commit graph

15 commits

Author SHA1 Message Date
Sebastian Thiel
06e869b518 feat(did-you-mean): for subcommands
If an argument is not understood as subcommand, but has a
high-confidence match in the list of all known subcommands, we will use
this one to print a customized error message.

Previously, it would say that a positional argument wasn't understood,
now it will say that a subcommand was unknown, and if the user meant
`high-confidence-candidate`.

If the argument doesn't sufficiently match any subcommand, the default
handling will take over and try to treat it as positional argument.

* added dependency to `strsym` crate
* new `did_you_mean` function uses `strsim::jaro_winkler(...)` to look
  for good candidates.

Related to #103
2015-05-05 17:12:20 -04:00
Sebastian Thiel
d17dcb2920 imp(clap-test): simplified make test invocation
* assure `make test` works on OSX as well
* simplified entire makefile, by basically removing sed invocations to
  manipulate the Cargo.toml file under source control.
* *works for me* predicate

This should probably be tested on another system as well, just to be
sure it makes sense for everyone.
2015-05-05 17:12:20 -04:00
Kevin K
a87d970c93 tests(run_test.py): update help messages to new fixes 2015-05-04 22:01:28 -04:00
Kevin K
45e481cb1c tests(main.rs): adds new features to tests 2015-05-04 22:01:28 -04:00
Kevin K
7ab5037402 tests(run_tests.py): update error messages 2015-05-03 16:20:12 -04:00
Kevin K
713cab8a4f tests(run_tests.py): update known good error messages to new messages 2015-05-03 00:38:18 -04:00
Kevin K
cf7f6c80cd tests(usage): update known good tests to new usage strings 2015-04-30 19:32:51 -04:00
Kevin K
42d9b142b7 tests(run_tests.py): update tests to allow new shorthand multi values 2015-04-30 15:28:01 -04:00
Kevin K
dd693ab86d tests(usage): update to smart usage errors 2015-04-30 12:13:03 -04:00
Kevin K
349927bfb1 tests(run_test.py): update tests to new error msgs 2015-04-27 00:54:21 -04:00
Kevin K
ac161fa3f4 tests(run_tests.py): update for new help format 2015-04-25 22:24:06 -04:00
Kevin K
79e26a6b3e tests(clap-tests): add test support for new from_usage features 2015-04-13 14:59:34 -04:00
Kevin K
e2488e50e4 tests(subcommand help): change to new usage generation known good 2015-04-09 18:39:29 -04:00
Kevin K
08f130612a tests(clap-tests): add subcommand tests 2015-04-08 18:01:06 -04:00
Kevin K
52415f4ba3 chore(tests): rename claptests->clap-tests 2015-04-08 17:10:59 -04:00
Renamed from claptests/run_tests.py (Browse further)