commit - 36294a9320dc6bf7ee5011797c5582c423908ed3
commit + 29db91b2698cd237d3b740b068584fe28325f97b
blob - /dev/null
blob + a3d4d1b4d99692d4b2bab78992ff059c280e5e0e (mode 644)
--- /dev/null
+++ bin/nof.lp
+# NOte Find
+
+A simple script to filter notes with fzf and open them in mg(1).
+
+=> https://gist.github.com/benevidesh/d78f7681120a13d5386ea55b39d82c9b Inspired by a gist
+
+ cd ~/notes || exit 1
+
+I store all the notes here, but die quickly should that directory not
+exists.
+
+ grep '^# ' * | \
+ sed -e 's/:/ | /1' | \
+ fzf --tac --multi --layout=reverse \
+ --preview "echo {} | sed 's/ .*//g' | xargs cat" | \
+ while read l; do
+ xargs -o mg -- "${l%% *}" </dev/null;
+
+I prefer this over binding enter in fzf. `xargs -o' re-opens /dev/tty
+so mg works.
+
+The fancy `${l%% *}' thingy is just to select only the filename (i.e.
+everything until the first space) and discard the rest of the line (the
+title.)
+
+ done
blob - 9ca1e385ee78c06c3bca4f169d0547414d1042b0
blob + 20ae214362cc5749199dc47268e97b528961096a
--- gen
+++ gen
pair bin/gamemode bin/gamemode.lp +x
pair bin/gmi2txt bin/gmi2txt.lp +x
pair bin/mquote bin/mquote.lp +x
+pair bin/nof bin/nof.lp +x
pair bin/sshot bin/sshot.lp +x
pair bin/template bin/template.lp +x