Doing with multiple sections
Funny story: I got a feature request for mdless to allow multiple sections to be specified in the output, but I misread the notification as a request for Doing. So I spent a couple hours adding multiple section handling to an array of Doing commands and happily reported the result to the user, who was very confused by the version number I gave him. I apologized and have now added multiple section handling to mdless, which was a lot less work than adding it to Doing. So I might as well write a blog post about the Doing feature nobody asked for, I guess.
Most of Doing’s many commands allow for the specification of a particular section, e.g. the show
command can limit its results to just one section, or the tag
command can tag the last X entries from a given section. Now, almost all of these commands can take multiple sections, either specified as -s section1,section2
or by using multiple -s
flags in the same command, e.g. doing show -s currently -s later
.
This allows a little more flexibility, especially for display commands. It also means you can perform actions on a more limited set of entries without limiting it to just a single set. It (obviously) doesn’t apply to the now
command or other entry commands because an entry can only be in one section.
By the way, section names are fuzzy matched, so you can specify that you want results from both Currently and Later (assuming you have such sections) with -s curr,lat
.
If I expand this further, I’ll allow negative arguments as well, such as doing show -s -archive
to exclude the Archive section. But for now it’s just multiple sections.
That’s all for now, just figured I’d mention it since I put the effort into it. You can update to the latest with gem install doing
(which might require sudo
, depending on your setup).