4 ms·
My "bash function" adds just a few more lines, so as to git add/commit/push after closing the editor, and adding a good title by default: ---- journalfile=$(d
by samuell 9y ago
My "bash function" adds just a few more lines, so as to git add/commit/push after closing the editor, and adding a good title by default:
----
journalfile=$(date --utc +%Y%m%d-%u.md);
if [[ ! -f $journalfile ]]; then
echo "# "$(date "+%A, %e %B, %Y") >> $journalfile;
git add $journalfile;
else
echo "File already exists: $journalfile";
fi;
vim $journalfile;
git commit -m "Changes in journal file $journalfile" $journalfile;
git push origin master;
----
Source: https://github.com/samuell/mdnote/blob/master/editnewjournalfile.sh#L3-L18 https://github.com/samuell/mdnote/blob/master/editnewjournal...