From 4ef8a43b013d91b8f447f4220f628b58603d861c Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Wed, 6 Aug 2025 18:25:00 +0300 Subject: [PATCH] {bash,zsh}rc: note ripgrep dependency for batgrep --- rc/bashrc | 6 ++++-- rc/zshrc | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rc/bashrc b/rc/bashrc index eb66301a..1a8f9f69 100755 --- a/rc/bashrc +++ b/rc/bashrc @@ -696,8 +696,10 @@ if ! hash btraceback 2> /dev/null; then #alias -g -- -h='-h 2>&1 | bat --language=help --style=plain' #alias -g -- --help='--help 2>&1 | bat --language=help --style=plain' fi - if hash batgrep 2> /dev/null; then - alias grep=batgrep + if hash rg 2> /dev/null; then + if hash batgrep 2> /dev/null; then + alias grep=batgrep + fi fi if hash batman 2> /dev/null; then eval "$(batman --export-env)" diff --git a/rc/zshrc b/rc/zshrc index d025095d..12e22a65 100755 --- a/rc/zshrc +++ b/rc/zshrc @@ -684,8 +684,10 @@ if ! hash btraceback 2> /dev/null; then alias -g -- -h='-h 2>&1 | bat --language=help --style=plain' alias -g -- --help='--help 2>&1 | bat --language=help --style=plain' fi - if hash batgrep 2> /dev/null; then - alias grep=batgrep + if hash rg 2> /dev/null; then + if hash batgrep 2> /dev/null; then + alias grep=batgrep + fi fi if hash batman 2> /dev/null; then eval "$(batman --export-env)"