From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12250 invoked from network); 24 Jan 2000 10:35:30 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 24 Jan 2000 10:35:30 -0000 Received: (qmail 27215 invoked by alias); 24 Jan 2000 10:35:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9417 Received: (qmail 27195 invoked from network); 24 Jan 2000 10:35:21 -0000 Date: Mon, 24 Jan 2000 11:35:20 +0100 (MET) Message-Id: <200001241035.LAA10587@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Tanaka Akira's message of 23 Jan 2000 20:48:49 +0900 Subject: Re: compset -P '/' Tanaka Akira wrote: > I found a problem with completion. > > Z(2):akr@is27e1u11% Src/zsh -f > is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst > is27e1u11% rm -rf z > is27e1u11% mkdir z z/y > is27e1u11% touch z/a > is27e1u11% _tst () { > function> compset -P '/' > function> _path_files -g '*(^/)' > function> _path_files -g '*(/)' > function> } > is27e1u11% tst /z/ > > -> > > is27e1u11% tst / > > zsh removes `z/' and the cursor is places on retained `/'. > But it should complete the file `a' and the directory `y'. It got confused about the match specs to use... the test the patch removes only made sense in the compctl code. > If the prefix is a colon rather than a slash, it works well. > > is27e1u11% _tst () { > compset -P ':' > _path_files -g '*(^/)' > _path_files -g '*(/)' > } > is27e1u11% tst :z/ > a y/ Because it didn't have a match spec comparable to `r:|/=*'. Bye Sven diff -ru ../z.old/Src/Zle/compcore.c Src/Zle/compcore.c --- ../z.old/Src/Zle/compcore.c Mon Jan 24 10:55:00 2000 +++ Src/Zle/compcore.c Mon Jan 24 11:32:21 2000 @@ -1603,8 +1603,7 @@ mst.matcher = dat->match; mstack = &mst; - if (!mnum) - add_bmatchers(dat->match); + add_bmatchers(dat->match); addlinknode(matchers, dat->match); dat->match->refc++; -- Sven Wischnowsky wischnow@informatik.hu-berlin.de