From dfec12e2a4437549ffb8ada0f752bd599cca8138 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Thu, 26 Jan 2012 12:47:59 +0100 Subject: [PATCH] ENH: Allow listpri filtering with priority ranges. So far, the listpri action only supports a single priority. Allowing priority ranges (e.g. todo.sh listpri A-C @work) is a simple but useful enhancement. Note: The syntax extension only clashes with the [TERM] filtering in a few corner cases, and this can be worked around (e.g. "todo.sh listpri A-Z A-Z" lists all prioritized tasks containing the text A-Z). --- tests/t1250-listpri.sh | 36 ++++++++++++++++++++++++++++++++++++ todo.sh | 15 ++++++++------- 2 files changed, 44 insertions(+), 7 deletions(-) diff --git a/tests/t1250-listpri.sh b/tests/t1250-listpri.sh index 0f97ec9..bab2ee3 100755 --- a/tests/t1250-listpri.sh +++ b/tests/t1250-listpri.sh @@ -61,6 +61,42 @@ TODO: 0 of 5 tasks shown TODO: 0 of 5 tasks shown EOF +cat > todo.txt <>> todo.sh -p listpri a-c +1 (B) smell the uppercase Roses +flowers @outside +3 (C) notice the sunflowers +-- +TODO: 2 of 5 tasks shown + +>>> todo.sh -p listpri c-Z +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 A- +2 (X) clean the house from A-Z +-- +TODO: 1 of 5 tasks shown + +>>> todo.sh -p listpri A-C A-Z +-- +TODO: 0 of 5 tasks shown + +>>> todo.sh -p listpri X A-Z +2 (X) clean the house from A-Z +-- +TODO: 1 of 5 tasks shown +EOF + cat > todo.txt <