X-Git-Url: https://us-delaporte.pagekite.me/gitweb/minion.git/blobdiff_plain/adb613803d139be75d7ecb4d83910ad033358294..1853b9b4021c1b24683e6fbc60dd1c4ef502bf30:/bin/moa diff --git a/bin/moa b/bin/moa index 38fa4ce..f66c00e 100755 --- a/bin/moa +++ b/bin/moa @@ -1,9 +1,13 @@ -#!/usr/bin/bash +#!/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