These bash functions slightly improved from[0], once added to your .bashrc
, will enable your bash with powerful note-taking and retrieval capabilities:
n today
opens a note named after today's date YYMMDDn awesome
opens a note namedawesome
ns git
will search for all references to git in your notesnc awesome
will dump the content ofawesome
nls 06
will list all notes that contain06
in their name
stan@st-stan1:~$ ns git
/home/stan/notes/git:## git checkout and track a remote branch
/home/stan/notes/git: git fetch origin jim-orders-collapsetax
/home/stan/notes/git: git checkout -t origin/jim-orders-collapsetax
/home/stan/notes/150612: git config branch.*branch-name*.rebase true
/home/stan/notes/150612: git config branch.autosetuprebase always --global (or .gitconfig)
/home/stan/notes/150425: git grep -l 'original_text' | xargs sed -i 's/original_text/new_text/g'
[0] http://lifehacker.com/5592047/turn-your-command-line-into-a-fast-and-simple-note-taking-tool
[ $1="today" ] - are you serious?