diff --git a/evennia/commands/cmdparser.py b/evennia/commands/cmdparser.py index a7c8c25416..8e993bbbfb 100644 --- a/evennia/commands/cmdparser.py +++ b/evennia/commands/cmdparser.py @@ -125,7 +125,7 @@ def try_num_differentiators(raw_string): # the user might be trying to identify the command # with a #num-command style syntax. We expect the regex to # contain the groups "number" and "name". - mindex, new_raw_string = (num_ref_match.group("number"), num_ref_match.group("name")) + mindex, new_raw_string = (num_ref_match.group("number"), num_ref_match.group("name") + num_ref_match.group("args")) return int(mindex), new_raw_string else: return None, None diff --git a/evennia/settings_default.py b/evennia/settings_default.py index e39dac5972..479178b10b 100644 --- a/evennia/settings_default.py +++ b/evennia/settings_default.py @@ -324,7 +324,7 @@ COMMAND_PARSER = "evennia.commands.cmdparser.cmdparser" # parser expects this. It should also involve a number starting from 1. # When changing this you must also update SEARCH_MULTIMATCH_TEMPLATE # to properly describe the syntax. -SEARCH_MULTIMATCH_REGEX = r"(?P.*)-(?P[0-9]+)" +SEARCH_MULTIMATCH_REGEX = r"(?P[^-]*)-(?P[0-9]+)(?P.*)" # To display multimatch errors in various listings we must display # the syntax in a way that matches what SEARCH_MULTIMATCH_REGEX understand. # The template will be populated with data and expects the following markup: