From cab785aec2b1ac00cfdfa79ec1abbd8dcf8f8cfb Mon Sep 17 00:00:00 2001 From: Ian Foster Date: Tue, 4 Feb 2014 11:30:11 -0800 Subject: [PATCH] bash notes shortcuts --- shell/bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shell/bashrc b/shell/bashrc index 7c7244b..866fd29 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -191,6 +191,15 @@ export LESS="-Sir" export CHROMIUM_USER_FLAGS="--disk-cache-dir=/tmp" +# ------------------- +# Terminal Notes +# ------------------- +NOTES_FOLDER=$HOME/Dropbox/notes +n() { $EDITOR $NOTES_FOLDER/"$*".txt ; } +nls() { tree -CR --noreport $NOTES_FOLDER | awk '{ if ((NR > 1) gsub(/.txt/,"")); if (NF==1) print $1; else if (NF==2) print $2; else if (NF==3) printf " %s\n", $3 }' ;} +nrm() { rm $NOTES_FOLDER/"$*".txt ; } + + # ------------------- # Other -- 1.9.1