1
0
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:
ik1ne 2019-08-20 11:10:00 +09:00
parent 17a7ea8fc4
commit 5b59e2c32a

View File

@ -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):