Merge branch 'java' of https://github.com/diezcami/thefuck into diezcami-java

Conflicts:
	README.md
This commit is contained in:
nvbn
2015-05-28 18:03:24 +03:00
3 changed files with 32 additions and 1 deletions
+13
View File
@@ -0,0 +1,13 @@
# 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]