|
|
@ -1292,12 +1292,12 @@ prompt_os_icon() {
|
|
|
|
################################################################
|
|
|
|
################################################################
|
|
|
|
# Segment to display PHP version number
|
|
|
|
# Segment to display PHP version number
|
|
|
|
prompt_php_version() {
|
|
|
|
prompt_php_version() {
|
|
|
|
local php_version
|
|
|
|
_p9k_cached_cmd_stdout php --version || return
|
|
|
|
php_version=$(php -v 2>&1 | grep -oe "^PHP\s*[0-9.]*")
|
|
|
|
emulate -L zsh && setopt extendedglob
|
|
|
|
|
|
|
|
local -a match
|
|
|
|
if [[ -n "$php_version" ]]; then
|
|
|
|
[[ $_P9K_RETVAL == (#b)(*$'\n')#(PHP [0-9.]##)* ]] || return
|
|
|
|
"$1_prompt_segment" "$0" "$2" "fuchsia" "grey93" '' 0 '' "${php_version//\%/%%}"
|
|
|
|
local v=$match[2]
|
|
|
|
fi
|
|
|
|
"$1_prompt_segment" "$0" "$2" "fuchsia" "grey93" '' 0 '' "${v//\%/%%}"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
################################################################
|
|
|
|
################################################################
|
|
|
|