mirror of
https://github.com/lloeki/dotfiles.git
synced 2025-12-06 07:24:39 +01:00
18 lines
340 B
Bash
Executable file
18 lines
340 B
Bash
Executable file
function note() {
|
|
(
|
|
local title="$1"
|
|
local timestamp="$(date +%Y%m%dT%H%M%S%z)"
|
|
local dir="${HOME}/.local/var/lib/notes"
|
|
|
|
mkdir -p "${dir}"
|
|
cd "${dir}"
|
|
if [[ -n $1 ]]; then
|
|
exec vim "$timestamp-$title.md"
|
|
else
|
|
exec vim .
|
|
fi
|
|
)
|
|
}
|
|
|
|
# vim: ft=zsh
|
|
|