Created
February 24, 2017 11:24
-
-
Save dwaxe/5c1af03a52b2747bed48e1d1b48fd12e to your computer and use it in GitHub Desktop.
fish function to create today's diary entry
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
function today | |
set todaystr (date "+%B%d.txt") | |
if test -e $todaystr | |
vim +3 $todaystr | |
else | |
date "+%B %d, %Y" >$todaystr | |
echo \n\n >>$todaystr | |
vim -c 'startinsert' +3 $todaystr | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment