Add note tool

This commit is contained in:
Loic Nageleisen 2019-06-10 15:34:32 +02:00
parent d084841d56
commit 3c50b3276d

18
shell/notes Executable file
View file

@ -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