Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: 3.1.6-pws-9: problems with fignore
- X-seq: zsh-workers 8718
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: BUG: 3.1.6-pws-9: problems with fignore
- Date: Mon, 22 Nov 1999 10:49:15 +0100 (MET)
- In-reply-to: mason@xxxxxxxxxxxxxxx's message of 22 Nov 1999 02:48:53 GMT
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Geoff Wing wrote:
> Heyla,
> "fignore <S> <Z> (FIGNORE <S>)
> An array (colon separated list) containing the suf-
> fixes of files to be ignored during filename com-
> pletion. However, if the completion generates only
> files which would match if this variable would be
> ignored, than these files are completed anyway."
>
> 1) fignore is for file completion, not directory completion.
Err. I always thought directories were files. And if I have a
directory named `foo~' I don't think I'd want to see it.
How about turning fignore into a style? Oops... sounds like a good
idea, doesn't it?
> 2) No completions with fignore used, but completions without it therefore
> complete without it.
>
> % mkdir /tmp/foo
> % cd /tmp/foo
> % touch BLAH.org
> % ls BLA<TAB>
Yep, thinko in addmatches(): fignore should only be used when really
adding matches otherwise the possible matches get sorted out before we
know that there are no matches when fignore is used.
Bye
Sven
diff -u oldsrc/Zle/compcore.c Src/Zle/compcore.c
--- oldsrc/Zle/compcore.c Tue Nov 16 10:07:51 1999
+++ Src/Zle/compcore.c Mon Nov 22 10:46:57 1999
@@ -1735,7 +1735,7 @@
}
sl = strlen(s);
isalt = oisalt;
- if ((!dat->psuf || !*(dat->psuf)) && aign) {
+ if (doadd && (!dat->psuf || !*(dat->psuf)) && aign) {
/* Do the suffix-test. If the match has one of the
* suffixes from ign, we put it in the alternate set. */
char **pt = aign;
@@ -1745,12 +1745,6 @@
if ((filell = strlen(*pt)) < sl
&& !strcmp(*pt, s + sl - filell))
isalt = 1;
-
- if (isalt && !doadd) {
- if (dparr && !*++dparr)
- dparr = NULL;
- continue;
- }
}
if (!(dat->aflags & CAF_MATCH)) {
if (dat->aflags & CAF_QUOTE)
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author