mirror of
https://github.com/CLIUtils/CLI11.git
synced 2026-01-19 04:52:08 +00:00
add an example of finding close matches (#1152)
continue discussion on #1149 Adds subcommand prefix matching as a modifier to CLI. Adds an example of close matching logic for further exploration. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -914,6 +914,11 @@ option_groups. These are:
|
||||
is not allowed to have a single character short option starting with the same
|
||||
character as a single dash long form name; for example, `-s` and `-single` are
|
||||
not allowed in the same application.
|
||||
- `.allow_subcommand_prefix_matching()`:🚧 If this modifier is enabled,
|
||||
unambiguious prefix portions of a subcommand will match. For example
|
||||
`upgrade_package` would match on `upgrade_`, `upg`, `u` as long as no other
|
||||
subcommand would also match. It also disallows subcommand names that are full
|
||||
prefixes of another subcommand.
|
||||
- `.fallthrough()`: Allow extra unmatched options and positionals to "fall
|
||||
through" and be matched on a parent option. Subcommands by default are allowed
|
||||
to "fall through" as in they will first attempt to match on the current
|
||||
|
||||
Reference in New Issue
Block a user