mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-29 06:40:08 +00:00
display only the version (without name) in package
by default
This commit is contained in:
parent
3308f18863
commit
ca8ec45f7a
1 changed files with 6 additions and 6 deletions
|
@ -2087,7 +2087,8 @@ prompt_package() {
|
||||||
elif [[ $field == (name|version) ]]; then
|
elif [[ $field == (name|version) ]]; then
|
||||||
(( ! $+found[$field] )) || return
|
(( ! $+found[$field] )) || return
|
||||||
[[ -n $s ]] || return
|
[[ -n $s ]] || return
|
||||||
print -v 'found[$field]' -- $s # this isn't quite right but close enough
|
[[ $s != *($'\n'|'\')* ]] || return
|
||||||
|
found[$field]=$s
|
||||||
(( $#found == 2 )) && break
|
(( $#found == 2 )) && break
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -2102,8 +2103,7 @@ prompt_package() {
|
||||||
|
|
||||||
P9K_PACKAGE_NAME=$_p9k__cache_val[2]
|
P9K_PACKAGE_NAME=$_p9k__cache_val[2]
|
||||||
P9K_PACKAGE_VERSION=$_p9k__cache_val[3]
|
P9K_PACKAGE_VERSION=$_p9k__cache_val[3]
|
||||||
local text="${${P9K_PACKAGE_NAME##*/}//\%/%%}@${P9K_PACKAGE_VERSION//\%/%%}"
|
_p9k_prompt_segment "$0" "cyan" "$_p9k_color1" PACKAGE_ICON 0 '' ${P9K_PACKAGE_VERSION//\%/%%}
|
||||||
_p9k_prompt_segment "$0" "cyan" "$_p9k_color1" PACKAGE_ICON 0 '' $text
|
|
||||||
}
|
}
|
||||||
|
|
||||||
################################################################
|
################################################################
|
||||||
|
@ -7495,7 +7495,7 @@ _p9k_must_init() {
|
||||||
[[ $sig == $_p9k__param_sig ]] && return 1
|
[[ $sig == $_p9k__param_sig ]] && return 1
|
||||||
_p9k_deinit
|
_p9k_deinit
|
||||||
fi
|
fi
|
||||||
_p9k__param_pat=$'v71\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
_p9k__param_pat=$'v72\1'${ZSH_VERSION}$'\1'${ZSH_PATCHLEVEL}$'\1'
|
||||||
_p9k__param_pat+=$'${#parameters[(I)POWERLEVEL9K_*]}\1${(%):-%n%#}\1$GITSTATUS_LOG_LEVEL\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+=$'$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\1'
|
_p9k__param_pat+=$'$DEFAULT_USER\1${ZLE_RPROMPT_INDENT:-1}\1$P9K_SSH\1$__p9k_ksh_arrays\1'
|
||||||
|
|
Loading…
Reference in a new issue