Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: 3.1.6-dev-22



On Apr 11,  9:54am, Sven Wischnowsky wrote:
} Subject: PATCH: Re: 3.1.6-dev-22
}
} I wrote:
} 
} - The change to file-patterns suggested by Peter (I planned to send
}   this in a separate patch and then accidentally overwrote it, sorry).
}   I.e. it looks a bit more like tags-order, one can do:
} 
}     ... file-patterns '*.o:obj-files *(-/):dirs' ...
} 
}   Giving more than one pattern per string, with different tags. Small
}   problem: one can still give more than one pattern per tag -- and has 
}   to separate them with commas. I don't like that, it's different from 
}   every other separation character we have.

One possibility is to use the familiar brace expansion syntax:

  ... file-patterns '{*.(a|o),*(*)}:compiled-files *(-/):dirs' ...

In fact, that syntax could be used everywhere that multiple glob patterns
are presently separated by spaces, which would e.g. make it clearer that
all the patterns in a PATTERNS:TAG form were associated with the TAG.
However, that's a much bigger change, and I don't know whether it makes
parsing a lot more difficult.

That also "looks like" it should mean:

  ... file-patterns '*.(a|o):compiled-files *(*):compiled-files ...' ...

which ought to be supported as equivalent if it isn't yet, that is,
mentioning a tag a second time in the same string should union rather
than replace the previous patterns for that tag.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author