3d0d4be4a9
Signed-off-by: Pablo Santiago Blum de Aguiar <scorphus@gmail.com>
13 lines
393 B
Python
13 lines
393 B
Python
from thefuck import shells
|
|
|
|
|
|
def match(command, settings):
|
|
# catches "Please commit or stash them" and "Please, commit your changes or
|
|
# stash them before you can switch branches."
|
|
return 'git' in command.script and 'or stash them' in command.stderr
|
|
|
|
|
|
def get_new_command(command, settings):
|
|
formatme = shells.and_('git stash', '{}')
|
|
return formatme.format(command.script)
|