xwmx / nb

CLI and local web plain text note‑taking, bookmarking, and archiving with linking, tagging, filtering, search, Git versioning & syncing, Pandoc conversion, + more, in a single portable script.
https://xwmx.github.io/nb
GNU Affero General Public License v3.0
6.64k stars 188 forks source link

Add NOT operator to search #247

Closed d-a-chapman closed 1 year ago

d-a-chapman commented 1 year ago

Loving nb -- thanks.

Is it possible to run a search query that returns files that don't match the query? I want to show notes that don't have a certain tag. I've tried using q \#tag --invert-grep, as per git grep documentation, but this doesn't work. Am I not doing something right or is this a missing feature?

Thanks!

xwmx commented 1 year ago

@d-a-chapman Glad you like it!

Thanks for the suggestion. I went ahead and added support for --not in search in the latest version in the repository. I still have to document the option before including it in a release version. Let me know if you run into any issues with it.

xwmx commented 1 year ago

This is available and documented as of version 7.5.0. @d-a-chapman Thanks for bringing this up.