mirror of
https://github.com/nvbn/thefuck.git
synced 2025-02-22 12:58:33 +00:00
Replace use of '&&' by shells.and_
This commit is contained in:
parent
b59e83cca9
commit
40fe604adc
@ -1,3 +1,6 @@
|
|||||||
|
from thefuck import shells
|
||||||
|
|
||||||
|
|
||||||
def match(command, settings):
|
def match(command, settings):
|
||||||
return ('git' in command.script
|
return ('git' in command.script
|
||||||
and 'pull' in command.script
|
and 'pull' in command.script
|
||||||
@ -9,4 +12,4 @@ def get_new_command(command, settings):
|
|||||||
branch = line.split(' ')[-1]
|
branch = line.split(' ')[-1]
|
||||||
set_upstream = line.replace('<remote>', 'origin')\
|
set_upstream = line.replace('<remote>', 'origin')\
|
||||||
.replace('<branch>', branch)
|
.replace('<branch>', branch)
|
||||||
return u'{} && {}'.format(set_upstream, command.script)
|
return shells.and_(set_upstream, command.script)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user