GothenburgBitFactory / GothenburgBitFactory/taskwarrior
[TW-1312] Negative limit: to behave as "tail" instead of "head"
- Dominant language
- C++
- Stars
- 6.1k
- Forks
- 423
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 11
Description
_Renato Alves on 2014-05-02T10:28:48Z says:_
The current limit: filter accepts negative numbers but never displays any task.
Example:
```
task limit:-2
7 tasks, -2 shown
```
Given that the behavior of `limit:` is similar to the unix `head` command I propose that negative numbers are treated as the unix `tail` command, selecting tasks starting from the end instead of the start.
In practice using a negative `limit:` would be equivalent to inverting the sort definition and transform the number to positive.
*PS1:* The feedback message displayed also seems wrong `7 tasks. -2 shown.`. Looks like another form of TW-908.
*PS2:* This request may conflict with the request from TW-173. It could work if task can see that in one form, only 1 number is being passed (current request), while in the other 2 numbers and an operator (TW-173).
*PS3:* `limit:0` Seems to be ignored. Makes sense, but not sure if this expected.
Contributor guide
Assessment
This issue has not been assessed yet.