Fix behavior of --todo with an optional argument

The previous behavior of --todo was to always only list uncompleted
items, unless zero was specified as additional argument. Restore and
document this behavior.

Also, fix two tests that failed because the --todo output is now sorted.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer
2016-01-28 18:34:42 +01:00
parent 41389abd55
commit 03c4465baf
5 changed files with 12 additions and 10 deletions

View File

@@ -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>::

View File

@@ -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>`::