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

Re: modify or delete variable





On 2024-04-07 10:53, Bart Schaefer wrote:
... seems to me the (M) would have the same function -- if the substring isn't there to be matched it can't be modified so kill the line.
That doesn't make sense in any case -- (M) means "include the matched
string", that is, reverse the effect of the :# operator which means
"delete the matching value".  What's the "reverse" of "replace A with
B anywhere"?  Certainly not "delete everything".

Yup, another example of getting the story wrong.


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