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