nix

configuration files that power my machines
Log | Files | Refs | README | LICENSE

todo (279B)


      1 #!/bin/sh
      2 
      3 f=~/.nb/notes/todo.txt
      4 t=${TMPDIR:-/tmp}/ta.$$
      5 
      6 alias tt='rg -N -B 1 "^todo:" "$f"'
      7 alias tn='todo-notify'
      8 
      9 ta() {
     10 	{
     11 		date '+%Y-%m-%d %H:%M:%S'
     12 		printf 'todo: \n'
     13 		echo
     14 	} >|"$t"
     15 	[ -f "$f" ] && cat "$f" >>"$t"
     16 	\mv "$t" "$f"
     17 	neatvi "$f"
     18 }
     19 
     20 te() {
     21 	neatvi "$f"
     22 }