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

Re: zstyle example

Oliver Kiddle wrote:
> The problem occurs on line 31 of _files which is:
>   for i in ${tmp//%p/${${glob:-\*}//:/\\:}}; do
> Changing it to:
>   for i in ${tmp//\%p/${${glob:-\*}//:/\\:}}; do
> allows it to work again but I can't see any good reason why the `%'
> should need to be quoted so I assume that this is a bug introduced with
> the recent changes to quoting in these substitutions.

Ah, it's because of the fix that //% didn't do the same as what /% did
--- they should both treat the % specially as an instruction to anchor
the match at the end of the string.  Logically, it should also have been
quoted, so this fix is correct.  (I find it an annoying notation for
just this sort of reason; zsh's substitution flags are much neater, but
this form is compatible with other shells.)

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

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