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

Re: Patterns quoting in subscript (was: Re: PATCH: Assorted parameter stuff)



I wrote:
}
} Not true.  Without the patch you can't explain the rationale for quoting,
} but with the patch it's predictable.  Similarly, without the patch this
} fails utterly:
} 
} schaefer[508] x='\?'
} schaefer[509] print -r $foo[(r)${(q)x}]
} \?

I'm sorry, I got my examples confused.  The pattern that fails without
my patch is any one with a close-bracket; with my patch, it works just
like the one with '\?', i.e. five backslashes:

schaefer[514] foo=(a '?' '\?' '\]')
schaefer[515] print -r $foo[(r)\\\\\]]
\]

Sorry about the confusion.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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