From c7f840a666f550cb0eae3a7fdd11c8b2c97bf893 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 27 May 2026 15:53:10 -0500 Subject: [PATCH] Avoid printing too many matches to html --- bin/mp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/mp b/bin/mp index f15073e..45291cb 100755 --- a/bin/mp +++ b/bin/mp @@ -1,9 +1,14 @@ #!/usr/bin/fish set year (date +%Y) -set files $(find $HOME/Journal/$year -type f -iname "*$argv*") +set files $(find $HOME/Journal/$year -type f -iname "*$argv*\.md") -for file in $files - mdtohtml $file > $file.html - firefox $file.html +if test (count $files) -lt 5; + for file in $files + mdtohtml $file > $file.html + firefox $file.html + end; +else + echo "More than 5 files found." end + -- 2.47.3