mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-15 15:18:53 +00:00
18 lines
318 B
Python
18 lines
318 B
Python
"""Fixes common java command mistake
|
|
|
|
Example:
|
|
> java foo.java
|
|
Error: Could not find or load main class foo.java
|
|
|
|
"""
|
|
from thefuck.utils import for_app
|
|
|
|
|
|
@for_app('java')
|
|
def match(command, settings):
|
|
return command.script.endswith('.java')
|
|
|
|
|
|
def get_new_command(command, settings):
|
|
return command.script[:-5]
|