zk-org / zk-nvim

Neovim extension for zk
https://github.com/zk-org/zk
GNU General Public License v3.0
502 stars 40 forks source link

How would one search for notes matching at least one tag in a list of options, but not necessarily all of them? #107

Closed brettmitchelldev closed 1 year ago

brettmitchelldev commented 1 year ago

The --tag parameter to zk supports searching for notes which match at least one of a list of tags using the OR operator.

zk list --tag 'tag1 OR tag2'

I can't seem to replicate this behavior with zk-nvim. I've tried passing in a string in a similar format as above to no avail:

zk.list(NOTES_DIR, {
  tag = 'tag1 OR tag1'
}, function (err, notes) end)

Passing in a list of tags implicitly assumes an AND operator rather than an OR.

zk.list(NOTES_DIR, {
  tag = { 'tag1', 'tag2' }
}, function (err, notes) end)

Is there a way of searching like this?

brettmitchelldev commented 1 year ago

It turns out I was too quick in opening an issue, my problem was due to something else in my own code. Apologies, I hate cluttering the issue history with noise.