From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4242 invoked from network); 16 Jun 2000 11:22:35 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Jun 2000 11:22:35 -0000 Received: (qmail 7950 invoked by alias); 16 Jun 2000 11:22:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11943 Received: (qmail 7942 invoked from network); 16 Jun 2000 11:22:19 -0000 Date: Fri, 16 Jun 2000 13:22:10 +0200 (MET DST) Message-Id: <200006161122.NAA30744@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Thu, 15 Jun 2000 15:32:41 +0000 Subject: Re: PATCH: Re: expansion Bart Schaefer wrote: > On Jun 15, 5:15pm, Sven Wischnowsky wrote: > } Subject: Re: PATCH: Re: expansion > } > } > a( and you will get '_expand:78: bad pattern: a(' because of the > } > lack of a closing bracket. > } > } It doesn't anymore, (e) is silent nowadays. By using eval we could get > } that, though (that's why I said `careful'). > > Something like this: > > eval exp\=\( ${${(q)exp}:gs/\\{/{/:gs/\\}/}/} \) > > I haven't figured out where the right place to put that is, though. I > tried a couple of different spots in _expand and they both caused brace > *completion* to stop working, even though the word on the line didn't > change. What's going on here? With -f: % a='a{b,c}d' % b=( ${${(q)a}:gs/\\{/{/:gs/\\}/}/} ) % echo $b a{b,c}d # OK % setopt braceccl % b=( ${${(q)a}:gs/\\{/{/:gs/\\}/}/} ) % echo $b a,d abd acd Oops. (Yes, works with just `echo ${${(q)a}...}', too.) Aha! It's the `{' and `}' in the replacements strings. They get tokenized by the lexer, etc. etc. Urgh. How... What... Where... Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de