diff options
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 73573a07..0b2287ef 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1130,11 +1130,10 @@ 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 /}" - + local laravel_version="$(php artisan --version 2> /dev/null)" + if [[ -n "${laravel_version}" && "${laravel_version}" =~ "Laravel Framework" ]]; then + # Strip out everything but the version + laravel_version="${laravel_version//Laravel Framework /}" "$1_prompt_segment" "$0" "$2" "maroon" "white" "${laravel_version}" 'LARAVEL_ICON' fi } |