Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- journal() {
- local journal_dir="$HOME/journal"
- local date_path=$(date +%Y/%m)
- local file_path="$journal_dir/$date_path/$(date +%Y-%m-%d).md"
- # Create directories
- mkdir -p "$journal_dir/$date_path"
- # Open in nvim
- nvim "$file_path"
- # Commit and push
- cd "$journal_dir"
- git add .
- git commit -m "journal: $(date +%Y-%m-%d)"
- git push || echo "Warning: git push failed (no remote? offline?)"
- }
Advertisement
Comments
-
- Hit me up. I may have something you'd like to read thru that may be interesting for your project
-
- Concerns information passed between admins of systems in similarity to a BBS
Add Comment
Please, Sign In to add comment