aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme9
1 files changed, 9 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 14d7bd81..e3be9c53 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -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