]> us-delaporte.pagekite.me Git - minion.git/blobdiff - bin/mo
Add wins helper
[minion.git] / bin / mo
diff --git a/bin/mo b/bin/mo
index 568dd3a7c0db1275d80f388412bc682f237a44f1..7d0e7cd6a71afa2f4ce4bce69f3246c9a66f63ac 100755 (executable)
--- a/bin/mo
+++ b/bin/mo
@@ -1,8 +1,14 @@
-#!/usr/bin/bash
+#!/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