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:
parent
28a8178fec
commit
b3c4b0c3c8
17
thefuck/rules/git_lfs_mistype.py
Normal file
17
thefuck/rules/git_lfs_mistype.py
Normal 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))
|
Loading…
x
Reference in New Issue
Block a user