mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-24 19:48:48 +00:00
* #833: do not require sudo on TravisCI * #N/A: Add Python dev releases to TravisCI pipeline Inspired by Brett Cannon's advise [1]. 1: https://snarky.ca/how-to-use-your-project-travis-to-help-test-python-itself/ * #837: try and kill proc and its children * #N/A: show shell information on `thefuck --version` * #N/A: omit default arguments to get_close_matches * #842: add settings var to control number of close matches * #N/A: remove `n` from the list of `get_closest`'s args
18 lines
627 B
Python
18 lines
627 B
Python
from thefuck.utils import get_close_matches
|
|
from thefuck.specific.git import git_support
|
|
|
|
|
|
@git_support
|
|
def match(command):
|
|
return (' rebase' in command.script and
|
|
'It seems that there is already a rebase-merge directory' in command.output and
|
|
'I wonder if you are in the middle of another rebase' in command.output)
|
|
|
|
|
|
@git_support
|
|
def get_new_command(command):
|
|
command_list = ['git rebase --continue', 'git rebase --abort', 'git rebase --skip']
|
|
rm_cmd = command.output.split('\n')[-4]
|
|
command_list.append(rm_cmd.strip())
|
|
return get_close_matches(command.script, command_list, 4, 0)
|