#701: Replace the first single occurrence of delete

This commit is contained in:
Pablo Santiago Blum de Aguiar
2017-10-08 18:54:37 -03:00
parent 3253b0e789
commit dfd0be2002
2 changed files with 9 additions and 5 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
from thefuck.utils import replace_argument
import re
from thefuck.specific.git import git_support
@@ -9,4 +10,4 @@ def match(command):
@git_support
def get_new_command(command):
return replace_argument(command.script, "delete", "remove")
return re.sub(r"delete", "remove", command.script, 1)