mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Add newline after multimatch string error message
Other utility functions, such as caller.msg(), don't require adding newline because newlines are added implicitly. This change modifies the multimatch string parameter to also not require newline, but add one implicitly.
This commit is contained in:
parent
6b4ce9eb2a
commit
f356b6b6d3
1 changed files with 6 additions and 2 deletions
|
|
@ -1786,8 +1786,12 @@ def at_search_result(matches, caller, query="", quiet=False, **kwargs):
|
|||
error = kwargs.get("nofound_string") or _("Could not find '%s'." % query)
|
||||
matches = None
|
||||
elif len(matches) > 1:
|
||||
error = kwargs.get("multimatch_string") or \
|
||||
_("More than one match for '%s' (please narrow target):\n" % query)
|
||||
multimatch_string = kwargs.get("multimatch_string")
|
||||
if multimatch_string:
|
||||
error = "%s\n" % multimatch_string
|
||||
else:
|
||||
error = _("More than one match for '%s' (please narrow target):\n" % query)
|
||||
|
||||
for num, result in enumerate(matches):
|
||||
# we need to consider Commands, where .aliases is a list
|
||||
aliases = result.aliases.all() if hasattr(result.aliases, "all") else result.aliases
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue