1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

git_flag_after_filename: Call match() instead of copying its body

This commit is contained in:
Joseph Frazier 2017-10-31 12:22:51 -04:00
parent 68df7154e5
commit f1fab0dbb2

View File

@ -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