aboutsummaryrefslogtreecommitdiff
path: root/examples/05_command_framework/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/05_command_framework/src')
-rw-r--r--examples/05_command_framework/src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/05_command_framework/src/main.rs b/examples/05_command_framework/src/main.rs
index 483d143..647ea56 100644
--- a/examples/05_command_framework/src/main.rs
+++ b/examples/05_command_framework/src/main.rs
@@ -149,6 +149,11 @@ fn main() {
// Some arguments require a `{}` in order to replace it with contextual information.
// In this case our `{}` refers to a command's name.
.command_not_found_text("Could not find: `{}`.")
+ // Define the maximum Levenshtein-distance between a searched command-name
+ // and commands. If the distance is lower than or equal the set distance,
+ // it will be displayed as a suggestion.
+ // Setting the distance to 0 will disable suggestions.
+ .max_levenshtein_distance(3)
// On another note, you can set up the help-menu-filter-behaviour.
// Here are all possible settings shown on all possible options.
// First case is if a user lacks permissions for a command, we can hide the command.