Add todo.txt addons

This commit is contained in:
Ethan Lane 2025-04-29 17:53:01 +01:00
parent 3e0905a8dd
commit 317555179f
13 changed files with 1567 additions and 0 deletions

20
.todo.actions.d/edit Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
case $1 in
"usage")
echo "$(basename $0) [BASENAME]"
echo " Open \$TODO_DIR/BASENAME.txt in \$EDITOR."
echo " If BASENAME is not given, defaults to 'todo'."
;;
*)
if [[ -z $2 ]]; then
FILE=$TODO_FILE
else
FILE=$TODO_DIR/$2.txt
fi
if [ -n "$EDITOR" ]; then
$EDITOR "$FILE"
else
echo "Error: The EDITOR environment variable is not set"
fi
;;
esac