From ca444e40009efc28f50c9a9002e07c4cc1668955 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Mon, 16 Sep 2024 08:24:07 +0200 Subject: [PATCH] ENH: Allow concatenation of multiple priorities [-ranges] for listpri It can be useful to filter for non-consecutive priority ranges. By enforcing uppercase in that added syntax, overlap with general TERM(s) (e.g. "foo-bar") can be mostly avoided (and in the rare case of having to filter by all-uppercase TERM(s) one can always pass the default A-Z filter, anyway). --- tests/t1250-listpri.sh | 20 ++++++++++++++++++++ todo.sh | 6 +++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/tests/t1250-listpri.sh b/tests/t1250-listpri.sh index ff374e2..26303cb 100755 --- a/tests/t1250-listpri.sh +++ b/tests/t1250-listpri.sh @@ -96,6 +96,26 @@ TODO: 0 of 5 tasks shown -- TODO: 1 of 5 tasks shown EOF +test_todo_session 'listpri filtering concatenation of priorities and -ranges' <>> todo.sh -p listpri CX +3 (C) notice the sunflowers +2 (X) clean the house from A-Z +4 (X) listen to music +-- +TODO: 3 of 5 tasks shown + +>>> todo.sh -p listpri ABR-Y +1 (B) smell the uppercase Roses +flowers @outside +2 (X) clean the house from A-Z +4 (X) listen to music +-- +TODO: 3 of 5 tasks shown + +>>> todo.sh -p listpri A- +2 (X) clean the house from A-Z +-- +TODO: 1 of 5 tasks shown +EOF cat > todo.txt <