-
-
Save fharbe/7453465 to your computer and use it in GitHub Desktop.
Note taking app for ~/bin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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