mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-23 23:51:58 +00:00
Drop grep usage in favor of zsh regex test
This commit is contained in:
parent
48b264f564
commit
ef1f29a5cb
1 changed files with 2 additions and 2 deletions
|
@ -1118,8 +1118,8 @@ prompt_vpn_ip() {
|
||||||
################################################################
|
################################################################
|
||||||
# Segment to display laravel version
|
# Segment to display laravel version
|
||||||
prompt_laravel_version() {
|
prompt_laravel_version() {
|
||||||
local laravel_version="$(php artisan --version 2>&1 | grep -oe '^Laravel Framework [0-9.]*')"
|
local laravel_version="$(php artisan --version 2> /dev/null"
|
||||||
if [[ -n "${laravel_version}" ]]; then
|
if [[ -n "${laravel_version}" && "${laravel_version}" =~ "Laravel Framework" ]]; then
|
||||||
# Strip out everything but the version
|
# Strip out everything but the version
|
||||||
laravel_version="${laravel_version//Laravel Framework /}"
|
laravel_version="${laravel_version//Laravel Framework /}"
|
||||||
"$1_prompt_segment" "$0" "$2" "maroon" "white" "${laravel_version}" 'LARAVEL_ICON'
|
"$1_prompt_segment" "$0" "$2" "maroon" "white" "${laravel_version}" 'LARAVEL_ICON'
|
||||||
|
|
Loading…
Reference in a new issue