#!/bin/bash # mo - minion open # Like `ml / minion list`, but opens all matches in your $EDITOR year=`date +%Y` files=$(find $HOME/Journal/$year -type f -iname "*$1*\.md") if [ -z ${EDITOR} ]; then echo "EDITOR unset, defaulting to Nano" export EDITOR=nano fi $EDITOR $files