-
Notifications
You must be signed in to change notification settings - Fork 98
Update JAVA_HOME #76
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
Update JAVA_HOME #76
Conversation
1bcf5b3 to
67bc326
Compare
|
LGTM. Tried with "Oh My Zsh", works well! |
set-java-home.bash
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if [[ ! -z "${java_path}" ]]; then | |
| if [[ -n "${java_path}" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, completely agree - thanks!
set-java-home.zsh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if [[ ! -z "${java_path}" ]]; then | |
| if [[ -n "${java_path}" ]]; then |
set-java-home.fish
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if test ! -z "$java_path" | |
| if test -n "$java_path" |
set-java-home.bash
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why all this complexity? I can have the correct path with asdf where java, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the way you are thinking! Resisting complexity is very important.
I did implement initially using asdf where java, but I followed the recommendation from @thuandt so we could support the system java as well.
% asdf where java
System version is selected
% asdf which java
/usr/bin/java
set-java-home.bash
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, this can be done without destroying the previous value:
| export PROMPT_COMMAND=prompt_command | |
| export PROMPT_COMMAND="$PROMPT_COMMAND; prompt_command" |
|
@rubencaro @thuandt if you guys are good with it now, let me know and I'll merge |
|
@halcyon LGTM 👍 |
|
@halcyon Me too! |
Fixes #51