diff options
author | Julien Roy <julien.vanroy@gmail.com> | 2018-03-24 13:04:16 +0300 |
---|---|---|
committer | Julien Roy <julien.vanroy@gmail.com> | 2018-03-24 13:04:16 +0300 |
commit | b260adbc1bc68d9729d6eebcfd344f83655bfda9 (patch) | |
tree | f9b8a51e935355ae8fabb34895fbf003dfdaa556 /powerlevel9k.zsh-theme | |
parent | afb7387abec505fb6565d31481c5f5ed724c2f08 (diff) |
Added a segment that shows the Java version.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 9 |
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 |