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

Re: coloring a substitution

On 2022-11-11 14:39, Roman Perepelitsa wrote:

These four cases are {case-sensitive, case-insensitive} x {full,
partial}. Moreover, the implementation of every case differs only on
these two bits: case insensitivity is always encoded as (#i) and
partial match always as *..*.
It is better.  More consistent.  I have no idea if the internal machinery is different but anyway the performance is identical.

The only bizarre thing here is the names of these cases.

Don't worry about my naming, that's all just fooling around, but every one of my functions has these same four cases and I'm trying to work up a universal way of talking about it that compact since sometimes I have longish messages and making them as compact as possible is a good idea.  I'll keep fooling around with it.

Can you similarly describe these four cases, the way I've done in the
first paragraph above? I cannot. All four look uniquely different, so
the inventive names (BROAD, TAME, WILD, EXACT) almost look justified.

Right now I'm leaning to ?? FULL PARTIAL and EXACT.  But what's better than BROAD?  I don't like it, need something better.  Tho I do like WILD, because it's intuitively suggestive of wildcards. Not that it really matters, as I said this is entirely for my own use.

Thanks for the help, I learned a great deal.

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