-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Speed up bash completion loading by packaging it as a file in the ZIP distribution #296
Comments
I have not noticed the delay before, but yes, when measuring with
The diff is around 120ms on my rather fast machine. That's indeed quite a lot.
If Sdkman/Brew had some sort of a hook to regenerate the completion during upgrades, I'd be all for it. Otherwise, the users would have to take care for regenerating the completion themselves. Maybe we could dump the file into the distribution ZIP, so that it at least has a canonical location. Sdkman users would have to add something like
to their
Our completion is based on this one: https://github.com/juven/maven-bash-completion/blob/master/bash_completion.bash
Is it? Why do you think so? I am very new to completion scripts. By no means it was an intention from my side :) As noted above, I just took juven's completion and added our option into it.
Not sure I follow. What kind of "add" do you mean?
You mean our completion would source some local file? If so, isn't |
Guess it is faster to have a small bash script doing the version check from a file in mvnd distro in bashrc rather than launching java...until you make this command a native one with graalvm ;). About the completion: what about doing some PR on the bash_completion.bash to enable some pluggability and reuse of functions? About jboss: cause wildfly, tomcat (JBoss Web Server ;)), vertx, spring-boot etc are all good jboss business but don't take it personal, it is probably a shortcut I did cause this great tool was contributed a lot by guys working for jboss. Point was not to blame jboss or anyone but more to ask to widen it to apache ecosystem and some common plugins like jbake if possible.
(at least run, build commands). About the extension point, i'd like for example to add:
and mvnd to take it automatically instead of rewriting a real compltion file Hope it is clearer |
Completion setup encourages to add to bashrc:
Since I did it, creating a new shell has some latency I hadn't before.
I wonder if it wouldn't encourage to either dump it once and source it (instead of regenerating it) or (better) reuse maven one if ~/.maven_bash_completion.bash exists to avoid the duplication.
side question: current plugin completion is very jboss oriented, is it possible to add meecrowave, winegrower, tomee, jbake - or at least use a ~/.mvn[d]_completion_plugins_customrc ?
The text was updated successfully, but these errors were encountered: