From fff09bb5122a84a252fe992ca907c70a7a486d14 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 8 Jul 2019 16:29:19 +0200 Subject: zshrc: Only use mpgrep when installed Signed-off-by: Florian Pritz --- .zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index a5154e2..db476dd 100644 --- a/.zshrc +++ b/.zshrc @@ -451,7 +451,11 @@ cat-history-notime() { } hgrep() { - cat-history | mpgrep "$@" | less + if type mpgrep &>/dev/null; then + cat-history | mpgrep "$@" | less + else + cat-history | grep "$@" | less + fi } cd-pkg() { -- cgit v1.2.3-24-g4f1b