1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-14 06:38:32 +00:00

add the rule

This commit is contained in:
Connor Martin 2020-02-24 10:43:09 -06:00
parent 28a8178fec
commit b3c4b0c3c8

View File

@ -0,0 +1,17 @@
from thefuck.shells import shell
from thefuck.specific.git import git_support
@git_support
def match(command):
'''
Match a mistyped command
'''
return 'lfs' in command.script and 'Did you mean this?' in command.output
@git_support
def get_new_command(command):
new = command.script.split(' ')
recommended = command.output.split('\n')[4].strip()
new[2] = recommended
return shell.and_(' '.join(new))