From f1fab0dbb25104213359c8da5aacb1bbed290a6b Mon Sep 17 00:00:00 2001 From: Joseph Frazier <1212jtraceur@gmail.com> Date: Tue, 31 Oct 2017 12:22:51 -0400 Subject: [PATCH] git_flag_after_filename: Call match() instead of copying its body --- thefuck/rules/git_flag_after_filename.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/rules/git_flag_after_filename.py b/thefuck/rules/git_flag_after_filename.py index c6b03260..78f93916 100644 --- a/thefuck/rules/git_flag_after_filename.py +++ b/thefuck/rules/git_flag_after_filename.py @@ -14,7 +14,7 @@ def get_new_command(command): command_parts = command.script_parts[:] # find the bad flag - bad_flag = re.search(error_pattern, command.output).group(1) + bad_flag = match(command).group(1) bad_flag_index = command_parts.index(bad_flag) # find the filename