mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 06:38:32 +00:00
Update thefuck/rules/omnienv_no_such_command.py
Co-authored-by: Divy Jain <dkj@somaiya.edu>
This commit is contained in:
parent
c23bbbe7b9
commit
34c1e41a71
@ -25,10 +25,11 @@ def get_app_commands(app):
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
app = command.script_parts[0]
|
||||
app_commands = cache(which(app))(get_app_commands)(app)
|
||||
broken = re.findall(r"env: no such command ['`]([^']*)'", command.output)[0]
|
||||
matched = [replace_argument(command.script, broken, common_typo)
|
||||
for common_typo in COMMON_TYPOS.get(broken, [])]
|
||||
|
||||
app = command.script_parts[0]
|
||||
app_commands = cache(which(app))(get_app_commands)(app)
|
||||
matched.extend(replace_command(command, broken, app_commands))
|
||||
return matched
|
||||
|
Loading…
x
Reference in New Issue
Block a user