From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13119 invoked from network); 28 Jun 2000 09:22:34 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jun 2000 09:22:34 -0000 Received: (qmail 22019 invoked by alias); 28 Jun 2000 09:22:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12104 Received: (qmail 22012 invoked from network); 28 Jun 2000 09:22:22 -0000 Date: Wed, 28 Jun 2000 11:22:20 +0200 (MET DST) Message-Id: <200006280922.LAA32227@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Jan Fedak's message of Tue, 27 Jun 2000 17:55:58 +0200 Subject: Re: erroneous completion when using {} Jan Fedak wrote: > When I use {} in a glob pattern like this: > > $ cat some/path/{directory\ 1, directory\ 2,_ > ^ > cursor :) > > and hit tab, my precious backslashes get lost: > > $ cat some/path/{directory 1,directory 2,directory\ Oh, this is ugly. The problem is this: the completion code gets the line tokenized, where the backslashes are turned int Bnull tokens. It has to remove them for normal completion. After that comes the code that looks for brace expansions, so that can't put the backslashes back because it can't find where they were. Doing the brace expansion stuff before removing the Null tokens won't work either because the brace expansion code has to remove the `{foo,' things from the string. And just quoting the strings the brace expansion code removes won't work either because of `{{a,b},' (the braces of `{a,b}' would be quoted). So we either need a special quoting function or a good idea. I've got to think about this some more. Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de