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

RE: Modifier substitutions.



>
> The `#' is being interpreted as an anchor at the head of the
> string even
> when buried inside $old.  I have a feeling that wasn't my intention.
>

Erm ... it was done by Bart (do not have arcticle number handy) as a
result of my question. It was originally used when _configure called
_long_options (was it called so?) to make "--disable-*" out of
"--enable-*" (and vice versa). It gets pattern/replacement in the form

'#--disable- --enable-'
...

The intent was to not match string in the middle of option (it is
unlikely in case of configure, but for the sake of generality ...) But,
probably, now, with backreferences it can be rewrited as

'(#m)--disable-(*) --enable-$MATCH'

and explicitly anchor at the beginning.

I do not insist on this change. This was the sole reason for it.

-andrej



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