diff --git a/shell/notes b/shell/notes new file mode 100755 index 0000000..3fbf1b1 --- /dev/null +++ b/shell/notes @@ -0,0 +1,18 @@ +function note() { + ( + local title="$1" + local timestamp="$(date +%Y-%m-%dT%H:%M:%S%z)" + local dir="${HOME}/Dropbox/Notes" + + mkdir -p "${dir}" + cd "${dir}" + if [[ -n $1 ]]; then + exec vim "$timestamp-$title.md" + else + exec vim . + fi + ) +} + +# vim: ft=zsh +