From: Edward Date: Wed, 27 May 2026 20:53:10 +0000 (-0500) Subject: Avoid printing too many matches to html X-Git-Url: https://apps.delaporte.us/gitweb/dotfiles.git/commitdiff_plain/c7f840a666f550cb0eae3a7fdd11c8b2c97bf893 Avoid printing too many matches to html --- 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 +