Guest User

Untitled

a guest
May 5th, 2026
234
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | Software | 0 0
  1. journal() {
  2. local journal_dir="$HOME/journal"
  3. local date_path=$(date +%Y/%m)
  4. local file_path="$journal_dir/$date_path/$(date +%Y-%m-%d).md"
  5.  
  6. # Create directories
  7. mkdir -p "$journal_dir/$date_path"
  8.  
  9. # Open in nvim
  10. nvim "$file_path"
  11.  
  12. # Commit and push
  13. cd "$journal_dir"
  14. git add .
  15. git commit -m "journal: $(date +%Y-%m-%d)"
  16. git push || echo "Warning: git push failed (no remote? offline?)"
  17. }
Advertisement
Comments
Add Comment
Please, Sign In to add comment