2015-08-27 16:42:09 +03:00
|
|
|
"""Appends .java when compiling java files
|
2015-08-17 13:44:15 +02:00
|
|
|
|
2015-08-27 16:42:09 +03:00
|
|
|
Example:
|
|
|
|
> javac foo
|
|
|
|
error: Class names, 'foo', are only accepted if annotation
|
|
|
|
processing is explicitly requested
|
2015-05-27 15:38:46 +08:00
|
|
|
|
2015-08-27 16:42:09 +03:00
|
|
|
"""
|
|
|
|
from thefuck.utils import for_app
|
|
|
|
|
|
|
|
|
|
|
|
@for_app('javac')
|
2015-09-07 13:00:29 +03:00
|
|
|
def match(command):
|
2015-08-27 16:42:09 +03:00
|
|
|
return not command.script.endswith('.java')
|
2015-06-26 14:08:25 +02:00
|
|
|
|
2015-05-27 15:38:46 +08:00
|
|
|
|
2015-09-07 13:00:29 +03:00
|
|
|
def get_new_command(command):
|
2015-06-26 14:08:25 +02:00
|
|
|
return command.script + '.java'
|