From 6b4a3cd4428e0643d5399c8760b9d2fb774f9c1c Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Wed, 17 Jun 2026 21:10:47 -0500 Subject: [PATCH] Add option to open an unrelated search term --- bin/mo | 6 +++++- bin/moa | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/mo b/bin/mo index 33f25d4..7d0e7cd 100755 --- a/bin/mo +++ b/bin/mo @@ -1,10 +1,14 @@ #!/bin/bash # mo - minion open # Like `ml / minion list`, but opens all matches in your $EDITOR +# Optionally search a second term - to quickly open differently named files year=`date +%Y` files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md") +if [ -n "$2" ]; then + more_files=$(find $HOME/Journal/$year -type f -iname "*$2*\.md") +fi if [ -z ${EDITOR} ]; then echo "EDITOR unset, defaulting to Nano" export EDITOR=nano fi -$EDITOR $files +$EDITOR $files $more_files diff --git a/bin/moa b/bin/moa index dbed63b..f66c00e 100755 --- a/bin/moa +++ b/bin/moa @@ -1,9 +1,13 @@ #!/bin/bash # moa - minion open any # Like `mla / minion list any`, but opens all matches in your $EDITOR +# Optionally search a second term - to quickly open differently named files files=$(find $HOME/Journal -type f -iname "*$1*\.md") +if [ -n "$2" ]; then + more_files=$(find $HOME/Journal -type f -iname "*$2*\.md") +fi if [ -z ${EDITOR} ]; then echo "EDITOR unset, defaulting to Nano" export EDITOR=nano fi -$EDITOR $files +$EDITOR $files $more_files -- 2.47.3