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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user