#913190 bash-completion: Update 'java' completion to support '.java' files

#913190#5
Date:
2018-11-07 22:00:48 UTC
From:
To:
.java files used to be compiled into .class files with 'javac' and then
executed with 'java', but starting with Java 11 the explicit compilation
can be skipped and the file executed directly.

For example:

  java Test.java

It would be nice if the bash completion could handle this case. Currently
the completion works only for the .class files.

#913190#10
Date:
2023-04-12 16:45:57 UTC
From:
To:
A side effect of the lack of support for .java files is that
bash-completion will turn slashes into dots for a Java command line. For
instance, if you type

$ java /home/

and press TAB, it will turn into

$ java .home.

IMO this raises the request from a new feature to a borderline bug,
because instead of simply failing to complete the final path component
(but letting the user type it in themselves or use M-/), it corrupts the
command line already entered by the user.