1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-07-08 08:03:24 +01:00
Files
thefuck/thefuck/rules/java.py

18 lines
298 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):
return command.script.endswith('.java')
def get_new_command(command):
return command.script[:-5]