summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2019-07-08 16:29:19 +0200
committerFlorian Pritz <bluewind@xinu.at>2019-10-08 15:58:01 +0200
commitfff09bb5122a84a252fe992ca907c70a7a486d14 (patch)
treefc5656d40e4e241a503700e3b887f03b29ebd6e5
parentf8395e1081b9ab73ed59261b9b8cf842561fb198 (diff)
downloaddotfiles-fff09bb5122a84a252fe992ca907c70a7a486d14.tar.gz
dotfiles-fff09bb5122a84a252fe992ca907c70a7a486d14.tar.xz
zshrc: Only use mpgrep when installed
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--.zshrc6
1 files changed, 5 insertions, 1 deletions
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() {