From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1044 invoked from network); 12 Jul 2000 08:25:43 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 12 Jul 2000 08:25:43 -0000 Received: (qmail 19864 invoked by alias); 12 Jul 2000 08:25:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12224 Received: (qmail 19852 invoked from network); 12 Jul 2000 08:25:21 -0000 From: "Bart Schaefer" Message-Id: <1000712082516.ZM9324@candle.brasslantern.com> Date: Wed, 12 Jul 2000 08:25:15 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Bug in ${(z)...} lexing, or what? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This has me baffled. Consider the following innocuous-looking function: widget() { zle up-history lastcmd=( ${(z)BUFFER} ) zle down-history } Now try this: zagzig% zle -N widget zagzig% bindkey '\e=' widget zagzig% ( setopt extendedglob ; [[ 'foo[x]=y' = (#i)[[:alpha:]][][[:alnum:]]#=* ]] ) zagzig% echo $lastcmd ( setopt extendedglob ; [[ 'foo[x]=y' = ( ; zagzig% What happened to everything after the '#' in '(#i)' ?? And where did that extra semicolon come from? The really strange thing is that this happens only in ZLE widgets, and only when there's a command separator (semi, amper, pipe, etc.) somewhere to the left of the [[ ]] expression. If I try the same thing outside of ZLE, it works perfectly; if I try a bare glob (not in [[ ... ]]) it also works. -- 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