From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24653 invoked from network); 17 Oct 2001 13:27:43 -0000 Received: from unknown (HELO sunsite.dk) (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Oct 2001 13:27:43 -0000 Received: (qmail 22018 invoked by alias); 17 Oct 2001 13:27:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16076 Received: (qmail 22004 invoked from network); 17 Oct 2001 13:27:31 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15309.34622.18416.249769@gargle.gargle.HOWL> Date: Wed, 17 Oct 2001 15:27:26 +0200 To: zsh-workers@sunsite.dk Subject: Re: ignore-line style In-Reply-To: <15306.60590.817177.439249@gargle.gargle.HOWL> References: <3BC31D30.11F61508@yahoo.co.uk> <15306.60590.817177.439249@gargle.gargle.HOWL> X-Mailer: VM 6.92 under 21.1 (patch 3) "Acadia" XEmacs Lucid I wrote: > Oliver Kiddle wrote: > > > I use this style: > > > > zstyle ':completion:*:*:(cat|diff|less|rm|vi):*' ignore-line true > > > > So, filenames I've already mentioned are not offered for completion > > with these commands. This is useful but there is a problem: > > > > With diff, it is quite common to compare a file to another file with > > the same name in a different directory but this style blocks completion > > of the second file. e.g: diff file ../fi > > It needs to include the `../' in the comparison against other words on > > the line. > > Yeah, I've stumbled over this, too, but didn't have the time to work > on it. And what's even more irritating, for me it shows that `file' in > the list but doesn't complete to it. Here is what seems to fix it. It was using _comp_ignore on every level it walked through, hence `file' matched. This seems almost too simple to not have any other effects, but let's try... (I'll leave it to Oliver to commit his patch). Bye Sven Index: Completion/Unix/Type/_path_files =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v retrieving revision 1.13 diff -u -r1.13 _path_files --- Completion/Unix/Type/_path_files 2001/10/11 09:19:56 1.13 +++ Completion/Unix/Type/_path_files 2001/10/17 13:23:54 @@ -351,19 +351,19 @@ elif [[ "$tmp1[1]" = */* ]]; then if [[ -n "$_comp_correct" ]]; then tmp2=( "$tmp1[@]" ) - builtin compadd -D tmp1 -F _comp_ignore "$matcher[@]" - "${(@)tmp1:t}" + builtin compadd -D tmp1 "$matcher[@]" - "${(@)tmp1:t}" if [[ $#tmp1 -eq 0 ]]; then tmp1=( "$tmp2[@]" ) - compadd -D tmp1 -F _comp_ignore "$matcher[@]" - "${(@)tmp2:t}" + compadd -D tmp1 "$matcher[@]" - "${(@)tmp2:t}" fi else tmp2=( "$tmp1[@]" ) - compadd -D tmp1 -F _comp_ignore "$matcher[@]" - "${(@)tmp1:t}" + compadd -D tmp1 "$matcher[@]" - "${(@)tmp1:t}" fi else tmp2=( '' ) - compadd -D tmp1 -F _comp_ignore "$matcher[@]" -a tmp1 + compadd -D tmp1 "$matcher[@]" -a tmp1 fi # If no file matches, save the expanded path and continue with -- Sven Wischnowsky wischnow@informatik.hu-berlin.de