mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 14:48:49 +00:00
Change: go_unknown_command.match now uses for_app decorator.
This commit is contained in:
parent
17a7ea8fc4
commit
5b59e2c32a
@ -1,14 +1,13 @@
|
||||
from thefuck.utils import get_closest, replace_argument
|
||||
from thefuck.utils import get_closest, replace_argument, for_app
|
||||
|
||||
_GOLANG_COMMANDS = (
|
||||
"bug", "build", "clean", "doc", "env", "fix", "fmt", "generate", "get",
|
||||
"install", "list", "mod", "run", "test", "tool", "version", "vet")
|
||||
|
||||
|
||||
@for_app('go')
|
||||
def match(command):
|
||||
return (command.script_parts
|
||||
and command.script_parts[0] == "go"
|
||||
and 'unknown command' in command.output)
|
||||
return 'unknown command' in command.output
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
|
Loading…
x
Reference in New Issue
Block a user