commit a048cf471d230e7e9bef91b6a76e7ab95335d562
parent 2a0c2f68c3d405af56738d0938060b0a961d2fd8
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date: Sun, 15 Sep 2024 17:07:27 +0000
Grep command no longer aborts when the internal grep finds no match
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pashage.sh b/src/pashage.sh
@@ -699,7 +699,7 @@ do_grep() {
if [ -d "${ARG}" ]; then
( cd "${ARG}" && do_grep "${SUBDIR}${ARG}/" "$@" )
elif [ "${ARG}" = "${ARG%.age}.age" ]; then
- FOUND="$(do_decrypt "${ARG}" | grep "$@")"
+ FOUND="$(do_decrypt "${ARG}" | (grep "$@" || true))"
if [ -n "${FOUND}" ]; then
printf '%s%s\n%s\n' \
"${BLUE_TEXT}${SUBDIR}" \