Last active
October 3, 2023 12:15
-
-
Save timmyha/3ab8bfd65c65e1fb10b8b96dba1edcfd to your computer and use it in GitHub Desktop.
new daily note zsh function
This file contains hidden or 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
| daily_note() { | |
| cd ~/Documents/notes | |
| if [ -e "$(date +%F).md" ] | |
| then | |
| echo "opening daily note" | |
| nvim "$(date +%F).md" | |
| else | |
| echo "creating new daily note, opening" | |
| cp ./templates/daily_note.md "$(date +%F).md" | |
| nvim "$(date +%F).md" | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment