Skip to content

Instantly share code, notes, and snippets.

@fharbe
Forked from Leask/n
Created November 13, 2013 17:59
Show Gist options
  • Save fharbe/7453465 to your computer and use it in GitHub Desktop.
Save fharbe/7453465 to your computer and use it in GitHub Desktop.
Note taking app for ~/bin
#!/bin/sh
# Flora Note by LeaskH.com
list() {
ls $note_path
}
edit() {
"$editor" $note_path
}
search() {
grep -r "$*" $note_path
}
fopen() {
open $note_path
}
# Config
note_path=~/Documents/Notes
editor='/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'
# Main logic
alias ls='ls -aiBFhlOT'
alias grep='grep --color=auto -ni --binary-files=without-match --exclude-dir .git'
case "$1" in
'l') list;;
'o') fopen;;
's') search "$2";;
*) edit;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment