zk-org / zk

A plain text note-taking assistant
https://zk-org.github.io/zk/
GNU General Public License v3.0
1.66k stars 122 forks source link

A more complete parser for tag filtering? #231

Open wrvsrx opened 2 years ago

wrvsrx commented 2 years ago

It seems that tag filter only supports simple logical operation now. Maybe It can support complete logical expression such as

zk list -t '(NOT aaa) OR bbb'

However, supporting complex login expression needs rewriting expression parser (https://github.com/mickael-menu/zk/blob/68e6b70eaefdf8344065fcec39d5419dc80d6a02/internal/adapter/sqlite/note_dao.go#L554-L600) and allow some escape character. I don't think it's very important though, just give this issue a low priority.

mickael-menu commented 2 years ago

I won't implement this myself but I'll welcome PRs if someone needs this.