aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBrandon Clothier <brandon14125@gmail.com>2018-07-18 18:45:05 +0300
committerGitHub <noreply@github.com>2018-07-18 18:45:05 +0300
commitef1f29a5cb171c739f0dbf41e6dbfa1fb3558345 (patch)
tree042d302d5aeab0bbb6eb7adfe192171b71098238 /powerlevel9k.zsh-theme
parent48b264f564c2322f4932da0d391fa98331ebc158 (diff)
Drop grep usage in favor of zsh regex test
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 6a2f0f5f..573f2f68 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1118,8 +1118,8 @@ prompt_vpn_ip() {
################################################################
# Segment to display laravel version
prompt_laravel_version() {
- local laravel_version="$(php artisan --version 2>&1 | grep -oe '^Laravel Framework [0-9.]*')"
- if [[ -n "${laravel_version}" ]]; then
+ 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'