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

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



On Wed, 18 Apr 2001, Bart Schaefer wrote:

> On Apr 17, 10:30pm, Andrej Borsenkow wrote:
> }
> } At least one thing has changed (but I consider behaviour broken in
> } anyway):
> }
> } bor@itsrm2:~%> foo=(a '?' '\?')
> } bor@itsrm2:~%> print -r $foo[(r)?]
> } a
> } bor@itsrm2:~%> print -r $foo[(r)\?]
> } ?
> } bor@itsrm2:~%> print -r $foo[(r)\\?]
> } ?
> } bor@itsrm2:~%> print -r $foo[(r)\\\?]
> } ?
>
> You just didn't try enough backslashes yet:
>
> schaefer[507] print -r $foo[(r)\\\\\?]
> \?
>

O.K., but why when I add additional backslashes I still get a match?:

bor@itsrm2:~%> print -r $foo[(r)\\\\\\\\\?]
\?

?? It seems to happen for any number of extra backslashes.

-andrej




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