diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-09-06 00:52:48 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-09-06 00:52:48 +0300 |
commit | 65c44d6141d493b5392be5d076d79f8ddf4c143d (patch) | |
tree | 8de52ce7800d3cefaff0f3fc281d95b3c13e87ef /powerlevel9k.zsh-theme | |
parent | f0e8b992dc2b7dbaf37721cdf26244aed0d30a84 (diff) | |
parent | 26a41f14b820f407eb314fdc5489a9b01379eaf8 (diff) |
Merge pull request #89 from dritter/php_version_segment
Added `php_version` segment.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index a6c77c90..b7835742 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -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 |