mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 00:10:08 +00:00
Added a segment that shows the PHP version.
This commit is contained in:
@@ -556,6 +556,16 @@ prompt_os_icon() {
|
||||
$1_prompt_segment "$0" "008" "255" "$OS_ICON"
|
||||
}
|
||||
|
||||
# print PHP version number
|
||||
prompt_php_version() {
|
||||
local php_version
|
||||
php_version=$(php -v 2>&1 | grep -oe "^PHP\s*[0-9.]*")
|
||||
|
||||
if [[ -n "$php_version" ]]; then
|
||||
$1_prompt_segment "$0" "013" "255" "$php_version"
|
||||
fi
|
||||
}
|
||||
|
||||
# rbenv information
|
||||
prompt_rbenv() {
|
||||
if [[ -n "$RBENV_VERSION" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user