1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-11-20 00:36:01 +00:00

Move all app/os specific utils to specific package

This commit is contained in:
nvbn
2015-08-25 14:09:47 +03:00
parent 2e002f666b
commit b21c9ebb43
39 changed files with 214 additions and 182 deletions

View File

@@ -1,8 +1,9 @@
from thefuck import utils, shells
from thefuck.utils import replace_argument
from thefuck.specific.git import git_support
@utils.git_support
@git_support
def match(command, settings):
return ('push' in command.script
and '! [rejected]' in command.stderr
@@ -10,7 +11,7 @@ def match(command, settings):
and 'Updates were rejected because the tip of your current branch is behind' in command.stderr)
@utils.git_support
@git_support
def get_new_command(command, settings):
return shells.and_(replace_argument(command.script, 'push', 'pull'),
command.script)