]> us-delaporte.pagekite.me Git - minion.git/blob - bin/moa
Fix for bash octal assumption
[minion.git] / bin / moa
1 #!/bin/bash
2 # moa - minion open any
3 # Like `mla / minion list any`, but opens all matches in your $EDITOR
4 # Optionally search a second term - to quickly open differently named files
5 files=$(find $HOME/Journal -type f -iname "*$1*\.md")
6 if [ -n "$2" ]; then
7 more_files=$(find $HOME/Journal -type f -iname "*$2*\.md")
8 fi
9 if [ -z ${EDITOR} ]; then
10 echo "EDITOR unset, defaulting to Nano"
11 export EDITOR=nano
12 fi
13 $EDITOR $files $more_files