- add this script to your
.bashrc
- adjust
$NOTES_HOME
path to your preferred location of the notes$NOTES_EDITOR
to your preferred editor in which the notes should be edited
Last active
December 2, 2018 12:20
-
-
Save danbruegge/fe6bcc8e3da0d5e1f5e562203ba6ae81 to your computer and use it in GitHub Desktop.
Simply manage your markdown notes in bash.
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
note () { | |
NOTES_HOME="$HOME/Cloud/Notes" | |
NOTES_EDITOR="nvim" | |
if [[ "ls" == *"$1"* ]]; then | |
tree "$NOTES_HOME"; | |
return | |
fi | |
if [[ "rm" == "$1" ]]; then | |
rm -i "$NOTES_HOME/$2.md"; | |
return | |
fi | |
$NOTES_EDITOR "$NOTES_HOME/$1.md"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment