Always use shortest match for completion.use_best_match
This commit is contained in:
parent
4984c9d05c
commit
12c9590524
@ -214,7 +214,8 @@ class CommandParser:
|
|||||||
Return:
|
Return:
|
||||||
cmdstr modified to the matching completion or unmodified
|
cmdstr modified to the matching completion or unmodified
|
||||||
"""
|
"""
|
||||||
matches = [cmd for cmd in cmdutils.cmd_dict if cmdstr in cmd]
|
matches = [cmd for cmd in sorted(cmdutils.cmd_dict, key=len)
|
||||||
|
if cmdstr in cmd]
|
||||||
if len(matches) == 1:
|
if len(matches) == 1:
|
||||||
cmdstr = matches[0]
|
cmdstr = matches[0]
|
||||||
elif len(matches) > 1 and config.val.completion.use_best_match:
|
elif len(matches) > 1 and config.val.completion.use_best_match:
|
||||||
|
Loading…
Reference in New Issue
Block a user