From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19427 invoked from network); 4 Jun 1999 10:00:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 4 Jun 1999 10:00:20 -0000 Received: (qmail 10057 invoked by alias); 4 Jun 1999 10:00:02 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6460 Received: (qmail 10040 invoked from network); 4 Jun 1999 10:00:01 -0000 Message-Id: <9906040932.AA23015@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: Better completion in quotes In-Reply-To: "Sven Wischnowsky"'s message of "Fri, 04 Jun 1999 11:33:52 DFT." <199906040933.LAA03117@beta.informatik.hu-berlin.de> Date: Fri, 04 Jun 1999 11:32:24 +0200 From: Peter Stephenson Sven Wischnowsky wrote: > So, as a much simpler solution I suggest to make the completion > code turn strings with quotes into a generic quoted form, using > backslashes. But it is a bit ugly that > > % ls 'foo b > > would be turned into foo\ bar. If this is unacceptable, we could > treat strings beginning with a quote as a special case and have the > code re-insert the quote at the beginning and automatically insert > the closing quote, that wouldn't be too hard, but I'm not sure I > like this special casing. I could be convinced, though. This seems to me the key issue in making it work the way people are expecting, so I'm not too unhappy about the idea of this being a special case. It's preferable to the horror of handling quotes in the middle of words properly, which I can easily believe is too much work. But I think it's also preferable to swapping the quotes for backslashes in this case: it works neatly the way most users will try most of the time, and it offers you some way of having your quotes left as they are; and bash has this problem too, only worse as it just beeps if there's a quote in the middle of the word. So long as the documentation is explicit about "foo' b" and "'foo b" completing differently, I would say let them have quotes. (I would hazard a guess there are not a few users around who don't even know you can stick quotes in the middle of words... it wasn't obvious to me when I first came to UNIX some time ago. People may even think changing those is a feature. "Urgh, someone's stuck some quotes in the middle of the word. It would look much better with backslashes...") -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy