diff --git a/thefuck/rules/omnienv_no_such_command.py b/thefuck/rules/omnienv_no_such_command.py index e2515ef6..ca8cc36d 100644 --- a/thefuck/rules/omnienv_no_such_command.py +++ b/thefuck/rules/omnienv_no_such_command.py @@ -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