X-Git-Url: https://apps.delaporte.us/gitweb/minion.git/blobdiff_plain/adb613803d139be75d7ecb4d83910ad033358294..05d965a0b458349e1dafa7968b636d3b22636dd6:/bin/mo diff --git a/bin/mo b/bin/mo index 70bd571..7d0e7cd 100755 --- a/bin/mo +++ b/bin/mo @@ -1,10 +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