Added a segment that shows the Java version.
This commit is contained in:
parent
afb7387abe
commit
b260adbc1b
3 changed files with 15 additions and 0 deletions
|
@ -1433,6 +1433,15 @@ prompt_kubecontext() {
|
|||
fi
|
||||
}
|
||||
|
||||
# print Java version number
|
||||
prompt_java_version() {
|
||||
local java_version
|
||||
java_version=$(java -fullversion 2>&1 | cut -d '"' -f 2)
|
||||
|
||||
if [[ -n "$java_version" ]]; then
|
||||
"$1_prompt_segment" "$0" "$2" "red" "white" "$java_version" "JAVA_ICON"
|
||||
fi
|
||||
}
|
||||
|
||||
################################################################
|
||||
# Prompt processing and drawing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue