mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-15 15:18:53 +00:00
17 lines
360 B
Python
17 lines
360 B
Python
from thefuck.utils import for_app
|
|
# Appends .go when compiling go files
|
|
#
|
|
# Example:
|
|
# > go run foo
|
|
# error: go run: no go files listed
|
|
|
|
|
|
@for_app('go')
|
|
def match(command, settings):
|
|
return (command.script.startswith('go run ')
|
|
and not command.script.endswith('.go'))
|
|
|
|
|
|
def get_new_command(command, settings):
|
|
return command.script + '.go'
|