Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
patterns in subscripts
- X-seq: zsh-workers 12484
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: <zsh-workers@xxxxxxxxxxxxxx>
- Subject: patterns in subscripts
- Date: Wed, 2 Aug 2000 15:43:26 +0400
- Importance: Normal
- In-reply-to: <200008021028.MAA08524@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> Yes, I know. I wanted to avoid introducing an extra parameter just for
> the pattern.
>
there is something fishy.
bor@itsrm2% typeset -A foo
bor@itsrm2% foo[bar]=baz
bor@itsrm2% foo[bar1]=baz1
bor@itsrm2% print ${foo[(I)*]}
bar1 bar
bor@itsrm2% print ${foo[(I)bar*]}
bar1 bar
bor@itsrm2% print ${foo[(I)bar*~bar?]}
bar
bor@itsrm2% print ${foo[(I)bar?#]}
bar1 bar
bor@itsrm2% print ${foo[(I)bar?##]}
BUG: ?# did not get optimized to *
BUG: ?# did not get optimized to *
bor@itsrm2% foo[bar\]]=baz\]
zsh: not an identifier: foo[bar\]]
bor@itsrm2% foo[bar\\]]=baz\]
zsh: command not found: foo[bar\]]=baz]
bor@itsrm2% foo[bar\\\]]=baz\]
zsh: not an identifier: foo[bar\\\]]
Must key always be identifier?
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author