mirror of
https://github.com/nvbn/thefuck.git
synced 2025-11-16 06:46:03 +00:00
15 lines
321 B
Python
15 lines
321 B
Python
# Fixes common java command mistake
|
|
#
|
|
# Example:
|
|
# > java foo.java
|
|
# Error: Could not find or load main class foo.java
|
|
|
|
|
|
def match(command, settings):
|
|
return (command.script.startswith('java ')
|
|
and command.script.endswith('.java'))
|
|
|
|
|
|
def get_new_command(command, settings):
|
|
return command.script[:-5]
|