Last active
November 16, 2024 07:04
-
-
Save purarue/bf1e82b29e87eb0bb3b88898e735deb5 to your computer and use it in GitHub Desktop.
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
journal-new() { | |
local target | |
cd "${XDG_DOCUMENTS_DIR}/Notes/journal" || return | |
target="$(date "+%Y-%m-%d").md" | |
if [[ ! -f "$target" ]]; then | |
{ | |
date | |
printf '\n\n' | |
} >"$target" | |
fi | |
nvim "$target" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment