diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-05-01 03:10:26 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-06-07 02:54:32 +0300 |
commit | a2d8cccd098bc1f739c324623bdabb701e65ba90 (patch) | |
tree | 374ffa0269bf6feacba711f7c5adab2867d83cc8 /powerlevel9k.zsh-theme | |
parent | d9d9fb9b6b9ede92fe76682c0fa4e03a29853695 (diff) |
Add a Laravel version segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index b9119d4c..dde838d9 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1110,6 +1110,18 @@ prompt_vpn_ip() { } ################################################################ +# Segment to display laravel version +prompt_laravel_version() { + local laravel_version="$(php artisan --version 2>/dev/null)" + if [[ -n "${laravel_version}" ]]; then + # Remove unrelevant infos + laravel_version="${laravel_version//Laravel Framework version /}" + + "$1_prompt_segment" "$0" "$2" "maroon" "white" "${laravel_version}" 'LARAVEL_ICON' + fi +} + +################################################################ # Segment to display load set_default POWERLEVEL9K_LOAD_WHICH 5 prompt_load() { |