[RFC 3/5] cli: support shell globbing patterns in new.ignore

David Bremner david at tethera.net
Sat Apr 9 17:37:34 PDT 2016


Jani Nikula <jani at nikula.org> writes:

> Keep the existing strcmp on the basename for backwards compatibility,
> and additionally use the new.ignore entries as fnmatch(3) patterns on
> the absolute filename. Note that it's not enough to add e.g. "foo*bar"
> to the list; you will need to do "*/foo*bar" to match the path also.

I guess when you say absolute file name, you mean the obvious thing, not
relative to the root of the notmuch maildir. It seems like it would be
quite useful to e.g. ignore directory foo at the top level of the
maildir, but not anywhere else, by specifying /foo as an ignore
pattern. I guess this would just require stripping the maildir root off
the front of the path before doing the fnmatch? That's not currently
part of the add_files_state_t, but it could be.

d


More information about the notmuch mailing list