From 5e2f716c8815c233657b3493463947af3bb24a0d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 9 Sep 2025 01:13:19 +0100 Subject: [PATCH] Refactor Signed-off-by: Oliver Davies --- zet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zet b/zet index 08e0e0a..c65153b 100755 --- a/zet +++ b/zet @@ -168,7 +168,7 @@ run_git_command() { } search_zets() { - grep --recursive --ignore-case --files-with-matches --exclude-dir=.git "$*" "$ZET_DIR" | while read -r file; do + find "$ZET_DIR" -type f -name "index.adoc" -exec grep --files-with-matches --ignore-case "$*" {} + | while read -r file; do id="$(get_zet_id_from_filepath "$file")" title=$(head -1 "$file" | sed 's/^= //' | sed 's/# //')