todo-txt: init

This commit is contained in:
Elnu 2023-02-19 16:53:15 -08:00
parent 18f3d245bb
commit 1c1b5256b9
4 changed files with 45 additions and 0 deletions

12
modules/todo-txt/pri.sh Executable file
View file

@ -0,0 +1,12 @@
ITEMS=$2
PRIORITY=$3
if [[ $ITEMS =~ ^([0-9]+)-([0-9]+)$ ]]; then
START=${BASH_REMATCH[1]}
END=${BASH_REMATCH[2]}
for i in $(seq $START $END); do
todo.sh command pri $i $PRIORITY || break
done
else
todo.sh command pri $ITEMS $PRIORITY
fi