From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21983 invoked from network); 15 Jun 2000 15:08:50 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Jun 2000 15:08:50 -0000 Received: (qmail 22974 invoked by alias); 15 Jun 2000 15:08:41 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11930 Received: (qmail 22958 invoked from network); 15 Jun 2000 15:08:35 -0000 From: "Bart Schaefer" Message-Id: <1000615150829.ZM5560@candle.brasslantern.com> Date: Thu, 15 Jun 2000 15:08:29 +0000 In-Reply-To: <200006151045.MAA06788@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: _expand doesn't do brace expansion?" (Jun 15, 12:45pm) References: <200006151045.MAA06788@beta.informatik.hu-berlin.de> <200006151058.MAA06585@beta.informatik.hu-berlin.de> In-Reply-To: <200006151058.MAA06585@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: _expand doesn't do brace expansion?" (Jun 15, 12:58pm) X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: _expand doesn't do brace expansion? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Let me preface this by saying: Don't feel obligated to do anything about this at all; I'm just trying to make helpful suggestions. On Jun 15, 12:45pm, Sven Wischnowsky wrote: } Subject: Re: _expand doesn't do brace expansion? } } Bart Schaefer wrote: } } > _complete manages to complete inside braces; why does the code that } > understands braces stop taking them apart when there's a closed pair? } } With `a{b,c}' the completion code would have to generate the } matches for `ab' and `ac', then built the intersection to get the } suffixes (and prefixes if there's a suffix, i.e. the middle-strings) } which are in both sets (in all n sets, actually). Forget the intersection; complete the union. With braces, it doesn't matter if some of the results e.g. don't exist as files. Usually I'm typing something like ln -s /usr{/local,}bin/blahblahblah and what I want is to complete along *either* path, not along *both*, because the thing I'm trying to complete only exists in one of them. } And that mey be } combined with arbitrarily complicated match specs. Frightening. There at least I think you'd be justified to consider anything inside a closed pair of braces in the prefix to be ineligible for comparison to match specs -- essentially, ineligible for anything that would insert characters anywhere other than at the cursor. } About the other thing, a careful `eval exp=(...)' could do the job } (avoiding error messages and such). Quite probably. -- 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