#3144: Parent and child match pattern modifier --------------------------+---------------------- Reporter: jlh | Owner: mutt-dev Type: enhancement | Status: new Priority: minor | Milestone: Component: mutt | Version: Resolution: | Keywords: --------------------------+----------------------
Comment (by kevin8t8): I'm attaching a (very quickly thrown together) patch to demonstrate a proposal. It has no documentation and only brief testing. I'll flush it out if this sounds reasonable. This version of the patch changes the syntax to: {{{ ~<(PATTERN) ~>(PATTERN) }}} for parent and children pattern matching, respectively. So the "<" and ">" are no longer pattern modifiers but part of an actual pattern operator, and the parenthesis are required. It uses the same parsing as "~()", which means it has a proper pattern->child to hold the contained pattern. This means a "!" in front will apply to the operator, while one inside the parenthesis will apply to the pattern. It also has a pattern->op, so we can just add it inside the existing mutt_pattern_exec() like the other operators. -- Ticket URL: <https://dev.mutt.org/trac/ticket/3144#comment:13> Mutt <http://www.mutt.org/> The Mutt mail user agent