1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-03 17:28:58 +00:00
thefuck/thefuck/rules/git_help_aliased.py
2016-03-12 18:51:47 -03:00

13 lines
322 B
Python

from thefuck.specific.git import git_support
@git_support
def match(command):
return 'help' in command.script and ' is aliased to ' in command.stdout
@git_support
def get_new_command(command):
aliased = command.stdout.split('`', 2)[2].split("'", 1)[0].split(' ', 1)[0]
return 'git help {}'.format(aliased)