mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-04 09:48:44 +00:00
Remove duplicate blank lines again
This commit is contained in:
parent
98abbf6703
commit
e304a370cd
@ -5,12 +5,10 @@ from thefuck.utils import for_app, replace_argument
|
|||||||
INVALID_CHOICE = "(?<=Invalid choice: ')(.*)(?=', maybe you meant:)"
|
INVALID_CHOICE = "(?<=Invalid choice: ')(.*)(?=', maybe you meant:)"
|
||||||
OPTIONS = "^\\s*\\*\\s(.*)"
|
OPTIONS = "^\\s*\\*\\s(.*)"
|
||||||
|
|
||||||
|
|
||||||
@for_app('gcloud')
|
@for_app('gcloud')
|
||||||
def match(command):
|
def match(command):
|
||||||
return "usage:" in command.output and "maybe you meant:" in command.output
|
return "usage:" in command.output and "maybe you meant:" in command.output
|
||||||
|
|
||||||
|
|
||||||
def get_new_command(command):
|
def get_new_command(command):
|
||||||
mistake = re.search(INVALID_CHOICE, command.output).group(0)
|
mistake = re.search(INVALID_CHOICE, command.output).group(0)
|
||||||
options = re.findall(OPTIONS, command.output, flags=re.MULTILINE)
|
options = re.findall(OPTIONS, command.output, flags=re.MULTILINE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user