Filters

There's a basic filter/query language built into wdid. You can use it to filter results in a powerful way. To use it, pass an argument to the default list command in filter form (passing a flag --filter also works):

# show me all of the items tagged "#pr", with a status of "waiting" from this week.
$ wdid "tag=#pr,status=waiting,time=week"

# show me all of the items tagged "#pr" and "@josler"
$ wdid "tag=#pr,tag=@josler"

# listing items not done within a group
$ wdid "status!=done,group=my group"

The filters should be passed as a list of filter objects separated by a comma ,.

The format of each filter is: {type_of_filter}{conditional}{value}. The supported types of filter at this time are: tag, status, time, and group. The tag and status values should be a valid tag (@josler) or status (done) and the value for a time filter is in wdid time format. The group filter uses the group name.

Currently, these filters are an AND filter - they must all be true for an item for it to be included in the list. Further, there are limits to which conditional can be used with each type:

  • = - tag, status, time, group

  • != - tag, status, group

  • > - time

  • < - time

Please note that < and > are inclusive (so really >=).

# show me all of the items _not_ tagged #pr but tagged @josler, earlier than this week
$ wdid -f "tag!=#pr,tag=@josler,time<this week"

Note that a status filter like "status=done,status=bumped" will never match, an item can't be done and waiting.

Matching More Than One Status

In order to ask for items that match one status or another status, you can use either a != or use the | operator (only works for statuses!):

# functionally equivalent
$ wdid "status!=waiting"
$ wdid "status=done|skipped|bumped"

Last updated