From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14820 invoked from network); 6 Nov 2000 17:15:37 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Nov 2000 17:15:37 -0000 Received: (qmail 22348 invoked by alias); 6 Nov 2000 17:15:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13127 Received: (qmail 22340 invoked from network); 6 Nov 2000 17:15:23 -0000 From: "Bart Schaefer" Message-Id: <1001106171510.ZM12421@candle.brasslantern.com> Date: Mon, 6 Nov 2000 17:15:09 +0000 In-Reply-To: <200011061534.KAA29444@soup.ads.apexinc.com> Comments: In reply to "E. Jay Berkenbilt" "Re: still confused about completion and matching" (Nov 6, 10:34am) References: <200010250750.JAA23801@beta.informatik.hu-berlin.de> <200011061534.KAA29444@soup.ads.apexinc.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: PATCH: _rcs (was Re: still confused about completion and matching) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 6, 10:34am, E. Jay Berkenbilt wrote: } Subject: Re: still confused about completion and matching } } It seems that the changes have still not been committed to the } repository. Is this because we're still waiting for reactions from } people who are not using the new patches or because we forgot or for } some other reason? I rather suspect it's just because Sven is busy. } I still haven't had time to write my smbclient completion function. } I've also added rewriting _rcs to use _arguments to my "eventually" } list unless someone else gets to it first. As brought up by another } user (Vincent Lefevre) the current behavior doesn't handle the more } subtle aspects of rcs's behavior very well. Hrm, I was just looking at the current _rcs. It begins: local nm=$compstate[nmatches] cmd="${words[1]:t}" ret=1 if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then [[ $compstate[nmatches] -eq nm ]] can't possibly be false. There used to be a call to _files *before* that test, but it got moved to the end by users/3472. I played for a few minutes with ${${((s:/:)words[(r)-x*]:s/-x//}:-,v} but concluded I wasn't going to get it right in the time I have to spare. So consider that a hint towards your rewrite. Index: Completion/User/_rcs =================================================================== @@ -1,8 +1,8 @@ #compdef co ci rcs -local nm=$compstate[nmatches] cmd="${words[1]:t}" ret=1 +local cmd="${words[1]:t}" ret=1 -if [[ $compstate[nmatches] -eq nm && -d RCS && $cmd != ci ]]; then +if [[ -d RCS && $cmd != ci ]]; then local rep expl rep=(RCS/*,v(:t:s/\,v//)) -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net