Created
March 21, 2018 16:13
-
-
Save alexandreaquiles/f50cb0be3fb9e2c157e36d51215f21e7 to your computer and use it in GitHub Desktop.
show current SDK Java version on the command prompt
This file contains hidden or 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
#show java version on prompt | |
current_sdk_java_version() { | |
export PS1="\e[0;32m$(sdk current java version | grep version | sed -e 's/.*version \(.*\)/\1/')\e[m$ " | |
} | |
PROMPT_COMMAND="current_sdk_java_version" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment