1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-11-16 14:56:03 +00:00

Pass settings to the rules

This commit is contained in:
nvbn
2015-04-08 21:08:35 +02:00
parent 173a4300b4
commit 9ed022d67f
8 changed files with 50 additions and 47 deletions

View File

@@ -1,8 +1,8 @@
def match(command):
def match(command, settings):
return ('git' in command.script
and 'push' in command.script
and 'set-upstream' in command.stderr)
def get_new_command(command):
def get_new_command(command, settings):
return command.stderr.split('\n')[-3].strip()