From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15296 invoked from network); 6 Jan 2000 15:03:55 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Jan 2000 15:03:55 -0000 Received: (qmail 25327 invoked by alias); 6 Jan 2000 15:03:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9250 Received: (qmail 25320 invoked from network); 6 Jan 2000 15:03:37 -0000 Date: Thu, 6 Jan 2000 16:03:15 +0100 (MET) Message-Id: <200001061503.QAA19187@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 06 Jan 2000 23:48:24 +0900 Subject: Re: completion with prefix which contains meta character. Tanaka Akira wrote: > In article <200001060938.KAA17703@beta.informatik.hu-berlin.de>, > Sven Wischnowsky writes: > > > But it should. At least I wanted to get the -P and -S be used > > literally (should be the most powerful, right?). > > I agree. It's the most powerful way. > > > Since I feel adventurous today, I even documented that. > > > > And that rembslash() didn't make any sense at all. > > Thanks. Now compadd -P is useful even in these cases. But I found > similar problem about compset -P. > > Z:akr@is27e1u11% Src/zsh -f > is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst > is27e1u11% _tst () { compset -P '\*' && compadd xxx } > is27e1u11% tst \* > > This completes nothing. > > is27e1u11% _tst () { compset -P '\\\*' && compadd xxx } > is27e1u11% tst \* > > This completes nothing, too. > > If compset -P tries to match against unquoted form of prefix, former > should complete xxx. If it tries to match against quoted form, latter > should complete xxx. But both completes nothing. Yup. Since $PREFIX contains the quoted form, compset should use it, too. Thanks. Bye Sven diff -ru ../z.old/Src/Zle/complete.c Src/Zle/complete.c --- ../z.old/Src/Zle/complete.c Thu Jan 6 13:52:33 2000 +++ Src/Zle/complete.c Thu Jan 6 15:59:48 2000 @@ -894,11 +894,9 @@ break; case CVT_RANGEPAT: tokenize(sa); - sa = rembslash(sa); remnulargs(sa); if (sb) { tokenize(sb); - sb = rembslash(sb); remnulargs(sb); } break; @@ -914,7 +912,6 @@ } else na = -1; tokenize(sa); - sa = rembslash(sa); remnulargs(sa); break; } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de