diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-01-13 17:17:29 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-01-13 17:17:29 +0300 |
commit | 1cf99b34e550e0294cb5d300bbf5b4eb331687aa (patch) | |
tree | a490099be23b156839c3d8a24d80f7bf0987c1b6 /internal/p10k.zsh | |
parent | ddecb91a0f3963eb11d00231da31c8736930bc28 (diff) |
give content expansion for rust_version access to full version through $P9K_RUST_VERSION; see #418
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 8f56afe9..400a53f9 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2320,6 +2320,7 @@ instant_prompt_root_indicator() { prompt_root_indicator; } ################################################################ # Segment to display Rust version number prompt_rust_version() { + unset P9K_RUST_VERSION (( $+commands[rustc] )) || return if (( _POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY )); then local dir=$_p9k_pwd_a @@ -2374,6 +2375,7 @@ prompt_rust_version() { fi local v=${${_p9k_cache_val[1]#rustc }%% *} [[ -n $v ]] || return + typeset -g P9K_RUST_VERSION=$_p9k_cache_val[1] _p9k_prompt_segment "$0" "darkorange" "$_p9k_color1" 'RUST_ICON' 0 '' "${v//\%/%%}" } |