-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add maven support #5299
Comments
If i'm not wrong it only does an exec which is fine but would it be possible to either cache it (with the env as key?) or read it from |
@rmannibucau you can use |
@JanDeDobbeleer I probably misread the code but I didn't see the key being composed of the env - my use case is SDKMan (Chocolatey on windows but it works a bit differently) and a switch of project using different maven (+java) versions and I want OMP to refresh the PS1 without a timeout or alike. SDKMan uses a symb link so the file resolution is more robust but since it sets the version in the env in another var using the env as a key can work too. |
@rmannibucau is there a specific env var that contains the version? Or just |
@JanDeDobbeleer think Side note: open question, what about invalidating the whole cache if anything in the env changes? Should be sufficient and more generic no? |
@rmannibucau that's possible, but we can also just validate that |
@JanDeDobbeleer agree it is another ticket, just mentionning it cause using too much exec the prompt becomes unusable very quickly. The fact to only cache the home is more fragile - nothing mentions it is first in the path/the path is not modified without, it is less to validate the path probably. |
Code of Conduct
What would you like to see added?
Hi,
I really like the simplicity to of adding java/dotnet version in PS1, in my custom PS1 I was used to add maven version too (if there is a pom.xml in the folder), is it possible to add it (parsing
mvn --version
)?The text was updated successfully, but these errors were encountered: