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

Re: coloring substitution seems to eat next line.

On 2022-11-14 09:12, Roman Perepelitsa wrote:

This is the same as what I posted.
Things get overlooked in the confusion, I often have ten things to learn all at the same time.  I'll sometimes take some code on faith and forget that I've forgotten to really understand it.  Or that an explanation was there previously.
now I just need to understand the '#%' anchors

I think I might:  Because it's a negation, you have to force the match to include the entire element from beginning to end.  You're sorta forcing a greedy match.  " ^$foo " searched for in " xxxfoobarxxx " will match " xxxfo " but will not match the whole string -- which is to say that it matches and therefore is rejected by the caret forcing negation.  It's not a simple construction.  Oh, and I would never have figured it out by myself, too many things have to work together just right.

See my previous post.


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