From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26360 invoked from network); 7 Jan 2000 09:27:20 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jan 2000 09:27:20 -0000 Received: (qmail 6933 invoked by alias); 7 Jan 2000 09:27:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9260 Received: (qmail 6926 invoked from network); 7 Jan 2000 09:27:07 -0000 Date: Fri, 7 Jan 2000 10:27:05 +0100 (MET) Message-Id: <200001070927.KAA16386@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 07 Jan 2000 08:38:28 +0900 Subject: Re: completion with prefix which contains meta character. Tanaka Akira wrote: > In article <200001061503.QAA19187@beta.informatik.hu-berlin.de>, > Sven Wischnowsky writes: > > > Yup. Since $PREFIX contains the quoted form, compset should use it, too. > > Now, `echo =' completes nothing. Ugh. > ... > > Replacing the compset pattern \= with = works well, but they should > have same bahaviour, I think. I first wanted to agree, then had a closer look at the quoting in the completion code again and now I'm not so sure again. Currently the completion code quotes only characters that need to be quoted. And it reports only such characters (in $PREFIX and friends) in quoted form. With respect to this, the behaviour of compset is now consistent. So the question is: should we change compset or not -- making it differ from the rest? Or should we just document the way the code quotes in the manual? Still, here is the patch for _main_complete, the state this leaves the code in will stay valid independent of the answer for the questions above. Bye Sven diff -ru ../z.old/Completion/Core/_main_complete Completion/Core/_main_complete --- ../z.old/Completion/Core/_main_complete Thu Jan 6 16:04:09 2000 +++ Completion/Core/_main_complete Fri Jan 7 10:21:23 2000 @@ -38,7 +38,7 @@ # Special completion contexts after `~' and `='. -if compset -P 1 '\='; then +if compset -P 1 '='; then compstate[context]=equal elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then compset -p 1 -- Sven Wischnowsky wischnow@informatik.hu-berlin.de