Created
April 20, 2021 18:19
-
-
Save clairtonluz/3de8722ebdf5ed4e11291fe174ee73cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set JAVA_HOME on every change directory while using asdf-vm | |
function asdf_update_java_home { | |
asdf current java 2>&1 > /dev/null | |
if [[ "$?" -eq 0 ]] | |
then | |
export JAVA_HOME=$(asdf where java) | |
fi | |
} | |
precmd() { asdf_update_java_home; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment