fizzed / blaze

Write your shell scripts on the JVM (java, kotlin, groovy, etc.)
109 stars 15 forks source link

Bash completion support #5

Open jjlauer opened 8 years ago

jjlauer commented 8 years ago

Support for bash completion of known tasks for a script would be incredibly useful and user-friendly. May require deeper integration with a terminal.

agentgt commented 6 years ago

I have been using GNU Make for some time now for project build aliases particular for Maven. Even with the new .mvn directory (jvm.config and maven.config). The only reason I use GNU Make is because it has builtin bash completion that I don't have to have someone go and install.

But GNU Make is not ideal for a variety of reasons one of which it does not provide automatic help of targets (ant does (ant -h IIRC) and I believe gradle and maven do as well) as well as no true multiple argument support (to do it requires some nasty hack that doesn't support completion).

Anyway I think the best way to accomplish this is to have two options:

  1. One a true bash completion that requires installation on the users part
  2. Interactive mode via JLine which will allow other platforms to work but requires you to first run the process.

I can attest that JLine is very good. Both Spring Roo and Spring boot use it. I have used it on some of my own tools in the past.