From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22058 invoked from network); 6 Jan 2006 20:37:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Jan 2006 20:37:11 -0000 Received: (qmail 14415 invoked from network); 6 Jan 2006 20:37:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Jan 2006 20:37:05 -0000 Received: (qmail 6657 invoked by alias); 6 Jan 2006 20:36:59 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22127 Received: (qmail 6648 invoked from network); 6 Jan 2006 20:36:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Jan 2006 20:36:58 -0000 Received: (qmail 13773 invoked from network); 6 Jan 2006 20:36:58 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO dot.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 6 Jan 2006 20:36:57 -0000 Received: by dot.blorf.net (Postfix, from userid 1000) id 8E72A8DE4; Fri, 6 Jan 2006 12:36:55 -0800 (PST) Date: Fri, 6 Jan 2006 12:36:55 -0800 From: Wayne Davison To: Mikael Magnusson Cc: zsh-workers@sunsite.dk Subject: Re: Bug in { completion's comma removal Message-ID: <20060106203655.GF10111@dot.blorf.net> References: <20060106180019.GB10111@dot.blorf.net> <237967ef0601061207h7802915dm580a12122a971242@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <237967ef0601061207h7802915dm580a12122a971242@mail.gmail.com> User-Agent: Mutt/1.5.11 On Fri, Jan 06, 2006 at 09:07:19PM +0100, Mikael Magnusson wrote: > While we're talking about {}, it also doesn't work so well on > filenames with spaces I haven't seen any problems with spaces as long as you put a backslash in front of each one (which is what the completion of a filename with spaces will automatically add). This is to be expected because a command-line of "f{oo bar,oo-baz}" (without the quotes) is really two args (neither one valid in syntax), but adding a backslash before the space makes it a single arg that will expand into two, "foo\ bar" and "foo-baz". > and there's no way (that i've figured out) to escape a comma inside > the braces. Yes, this is a problem when completing and expanding in zle. It does appear to work fine in the shell itself: % echo ba{r\,1,z\,2} bar,1 baz,2 However, when completing a filename with a comma inside an open {, zsh does not add a backslash before the comma, and it strips any existing backslash before a comma (e.g. pressing on the above term would incorrectly expand the line into "echo bar ba1 baz ba2"). ..wayne..