#298 Suggest more than one result in *_no_command rules
This commit is contained in:
@@ -178,3 +178,10 @@ def get_all_matched_commands(stderr, separator='Did you mean'):
|
||||
should_yield = True
|
||||
elif should_yield and line:
|
||||
yield line.strip()
|
||||
|
||||
|
||||
def replace_command(command, broken, matched):
|
||||
"""Helper for *_no_command rules."""
|
||||
new_cmds = get_close_matches(broken, matched, cutoff=0.1)
|
||||
return [replace_argument(command.script, broken, new_cmd.strip())
|
||||
for new_cmd in new_cmds]
|
||||
|
||||
Reference in New Issue
Block a user