diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-02-28 13:27:10 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-02-28 13:27:10 +0300 |
commit | 155485a996ade7d5baa05b23e4c9794bba74fe14 (patch) | |
tree | 5afccc1ac6ec0fb00835e2a9449d72d4409df8f7 /internal/p10k.zsh | |
parent | b207dd8e999518cec6d2cffe89e9563961c5e663 (diff) |
add POWERLEVEL9K_JAVA_VERSION_FULL parameter
The file pattern is based on https://github.com/starship/starship/pull/966.
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 0ceb3e18..5d02e338 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4157,6 +4157,9 @@ _p9k_prompt_dropbox_init() { # print Java version number prompt_java_version() { + if (( _POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY )); then + _p9k_upglob 'pom.xml|build.gradle.kts|build.sbt|deps.edn|project.clj|build.boot|*.(java|class|jar|gradle|clj|cljc)' && return + fi _p9k_cached_cmd_stdout_stderr java -fullversion || return local v=$_p9k__ret v=${${v#*\"}%\"*} @@ -6603,6 +6606,7 @@ _p9k_init_params() { _p9k_declare -b POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY 1 _p9k_declare -b POWERLEVEL9K_GO_VERSION_PROJECT_ONLY 1 _p9k_declare -b POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY 1 + _p9k_declare -b POWERLEVEL9K_JAVA_VERSION_PROJECT_ONLY 0 _p9k_declare -b POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW 0 _p9k_declare -a POWERLEVEL9K_RBENV_SOURCES -- shell local global _p9k_declare -b POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW 0 @@ -7276,7 +7280,7 @@ _p9k_must_init() { [[ $sig == $_p9k__param_sig ]] && return 1 _p9k_deinit fi - _p9k__param_pat=$'v63\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1' + _p9k__param_pat=$'v64\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1' _p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\1' _p9k__param_pat+=$'$GITSTATUS_ENABLE_LOGGING\1$GITSTATUS_DAEMON\1$GITSTATUS_NUM_THREADS\1' _p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays' |