jschlatow / taskopen

Tool for taking notes and open urls with taskwarrior
GNU General Public License v2.0
368 stars 32 forks source link

RFE: taskopen -0 (-1, -3 etc) #65

Closed linuxcaffe closed 9 years ago

linuxcaffe commented 11 years ago

Using a numeric option-flag limits the number of matching annotations that will be listed, similar to the taskwarrior limit: option. This can be used to show only -# of annotations, to narrow the scope to the top # of any given query/ sort. -1 is kind of special, directly opening the top-most annot (this is totally sort-dependent) no matter how many matches are found (as long as there exists at least 1). -2, -5, -10 can be used for generating manageable batches of the oldest, newest, biggest, most urgent, most neglected.. you name it. -0 could be used as well, listing and opening zero annotations, but instead displaying the count of annotations that match the query.

linuxcaffe commented 11 years ago

The leading "-" differentiates this option from task IDs, but similar ranges could be defined, and a trailing "-" could be used to indicate the last/least/bottom of the list.

EDIT

In thinking about this, inverting the number is superfluous, as the sort-order is already easy to invert, with the same result. Regarding # ranges, this doesn't make much sense either, because it's unlikely that you'll know what -5-10 annotations might contain, for any given sort. So sum up, while -0, -1, -3.. will be really handy, inversions and ranges will probably not be needed.