This might be the last big na update for a little while, but it’s got some great stuff in it. I’m really aiming to make this a great companion to TaskPaper, and I think it’s coming along nicely.

Natural Date Comparisons

First, you can now do natural language date comparisons for tag searches. For example, if you have an @due(DATE) tag in your todo file, you can run na tagged "due<now" to find everything that’s currently due. Or na tagged "start<=in 2 days" to find upcoming tasks. If a tag contains a date, it will be automatically detected and the comparison will be interpreted as a natural language date. You can, of course, use any valid date format for a specific date. Comparisons using *=, ^=, and $= will still do actual text comparisons, so you can perform a query like na tagged "due^=2022-10" to see everything with an October, 2022 due date.

Saved Searches

So, say you have a query like “due<=in 2 days” that you run frequently. Now you can add --save TITLE to the command, e.g. na tagged "due<=in 2 days" --save soon, to save that search for future use. Once saved, you can just run na saved soon to repeat the search. This can be especially handy for searches with multiple criteria, such as na tagged "due<in 7 days,start>=yesterday".

Other recent changes

Since the last time I wrote about it… like 2 days ago? I’ve not been sleeping well.

CHANGED

  • If no + or ! tokens are given in search, default to AND search for tokens

NEW

  • na add -d X to allow adding new actions to todo files in subdirectories
  • You can use --project X to display only actions within a specific project. Specify subprojects with a path, e.g. na/bugs. Partial matches allowed, works with next, find, and tagged
  • find and tagged recognize * and ? as wildcards
  • --regex flag for find command
  • --in todo/path flag for find and tagged commands to specify a todo file from history
  • na todos will list (and optionally search) known todo files from history

IMPROVED

  • When specifying arguments to next, allow paths separated by / to do more exact matching
  • Highlight search terms in results
  • Added --or flag to tagged and find to default to OR boolean combination of search terms/tags
  • Fuzzier matching of todo file history
  • Allow wildcards (* and ?) when matching todo history
  • Allow multiple todo queries separated by comma

FIXED

  • When adding a project, don’t use Ruby #capitalize, which downcases the rest of the project name
  • Multiple search terms overriding each other

To get all this goodness, update to the latest version (1.1.23+) using gem upgrade na or brew gem upgrade na.

A big thanks goes to Ralf Hülsmann, who has brought a lot of especially great feature requests to light.