summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/calcurse.1.txt8
-rw-r--r--doc/manual.txt8
-rw-r--r--src/args.c2
-rwxr-xr-xtest/filter-001.sh2
-rwxr-xr-xtest/todo-002.sh2
5 files changed, 12 insertions, 10 deletions
diff --git a/doc/calcurse.1.txt b/doc/calcurse.1.txt
index 829ede2..28238d1 100644
--- a/doc/calcurse.1.txt
+++ b/doc/calcurse.1.txt
@@ -183,10 +183,10 @@ in read-only mode, all changes from this session will be lost without warning!
*-t*[num], *--todo*[=num]::
Print the *todo* list and exit. If the optional number 'num' is given, then
- only todos having a priority equal to 'num' will be returned. The priority
- number must be between 1 (highest) and 9 (lowest). It is also possible to
- specify *0* for the priority, in which case only completed tasks will be
- shown. Equivalent to *-Q --filter-type todo*, combined with
+ only uncompleted todos having a priority equal to 'num' will be returned. The
+ priority number must be between 1 (highest) and 9 (lowest). It is also
+ possible to specify *0* for the priority, in which case only completed tasks
+ will be shown. Equivalent to *-Q --filter-type todo*, combined with
*--filter-priority* and *--filter-completed* or *--filter-uncompleted*.
*--to* <date>::
diff --git a/doc/manual.txt b/doc/manual.txt
index a388fe0..be6875d 100644
--- a/doc/manual.txt
+++ b/doc/manual.txt
@@ -376,10 +376,10 @@ in read-only mode, all changes from this session will be lost without warning!
`-t[num], --todo[=num]`::
Print the `todo` list and exit. If the optional number `num` is given, then
- only todos having a priority equal to `num` will be returned. The priority
- number must be between 1 (highest) and 9 (lowest). It is also possible to
- specify `0` for the priority, in which case only completed tasks will be
- shown. Equivalent to `-Q --filter-type todo`, combined with
+ only uncompleted todos having a priority equal to `num` will be returned. The
+ priority number must be between 1 (highest) and 9 (lowest). It is also
+ possible to specify `0` for the priority, in which case only completed tasks
+ will be shown. Equivalent to `-Q --filter-type todo`, combined with
`--filter-priority` and `--filter-completed` or `--filter-uncompleted`.
`--to <date>`::
diff --git a/src/args.c b/src/args.c
index 6a85885..a82fcac 100644
--- a/src/args.c
+++ b/src/args.c
@@ -534,6 +534,8 @@ int parse_args(int argc, char **argv)
filter.priority = atoi(optarg);
if (filter.priority == 0)
filter.completed = 1;
+ else
+ filter.uncompleted = 1;
EXIT_IF(filter.priority > 9,
_("invalid priority: %s"), optarg);
} else {
diff --git a/test/filter-001.sh b/test/filter-001.sh
index 2dcbb25..3e0aca5 100755
--- a/test/filter-001.sh
+++ b/test/filter-001.sh
@@ -8,8 +8,8 @@ if [ "$1" = 'actual' ]; then
elif [ "$1" = 'expected' ]; then
cat <<EOD
to do:
-9. Gloriously slams
9. Beefburger's
+9. Gloriously slams
9. Seasons
02/23/13:
diff --git a/test/todo-002.sh b/test/todo-002.sh
index 9e06dc3..8e9e214 100755
--- a/test/todo-002.sh
+++ b/test/todo-002.sh
@@ -6,7 +6,7 @@ if [ "$1" = 'actual' ]; then
"$CALCURSE" --read-only -D "$DATA_DIR"/ -t3
elif [ "$1" = 'expected' ]; then
echo 'to do:'
- sed -n 's/^\[3\] \(.*\)/3. \1/p' "$DATA_DIR"/todo
+ sed -n 's/^\[3\] \(.*\)/3. \1/p' "$DATA_DIR"/todo | sort
else
./run-test "$0"
fi