1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-02-07 05:31:18 +00:00
thefuck/thefuck/rules/javac.py
mcarton 7173e0dbad Use spaces instead of tabs
The is more common in python and follows other rules usage.
2015-06-26 14:50:01 +02:00

16 lines
380 B
Python

# Appends .java when compiling java files
#
# Example:
# > javac foo
# error: Class names, 'foo', are only accepted if annotation
# processing is explicitly requested
def match(command, settings):
return (command.script.startswith('javac ')
and not command.script.endswith('.java'))
def get_new_command(command, settings):
return command.script + '.java'