sparksofl
1/24/2017 - 9:39 AM

notes.sh

n() {
  touch ~/Documents/notes/$(date "+%d%m%y") || exit
  $EDITOR ~/Documents/notes/$(date "+%d%m%y")
}

nls() {
  cd ~/Documents/notes/
  ls -c ~/Documents/notes/ | grep "$*"
}

nf() {
  for f in ./*; do
    if [[ `cat $f | grep $1` ]]; then
    echo
    echo "$fg_bold ${f##*/} $reset_color"
    echo
    cat $f
    fi
  done
}

nt() {
  note=~/Documents/notes/$(date "+%d%m%y")
  echo "$fg_bold[cyan]`cat $note`$reset_color"
}