From 1cf99b34e550e0294cb5d300bbf5b4eb331687aa Mon Sep 17 00:00:00 2001 From: romkatv Date: Mon, 13 Jan 2020 15:17:29 +0100 Subject: [PATCH] give content expansion for rust_version access to full version through $P9K_RUST_VERSION; see #418 --- internal/p10k.zsh | 2 ++ 1 file changed, 2 insertions(+) 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//\%/%%}" }