* Re: BUG: 3.1.6-pws-9: problems with fignore
@ 1999-11-22 9:49 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-11-22 9:49 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* BUG: 3.1.6-pws-9: problems with fignore
@ 1999-11-22 2:48 Geoff Wing
0 siblings, 0 replies; 2+ messages in thread
From: Geoff Wing @ 1999-11-22 2:48 UTC (permalink / raw)
To: zsh-workers
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.
% echo $fignore
.o .out .org ~
% ls -F /ftp/
zsh.org/
% /ftp/<TAB> # ---> gives next line
% /ftp/zsh.org/
% cd /ftp/<TAB> # ---> gives next line
% cd /ftp/zsh.org/
% mkdir /ftp/any-old-name
% cd /ftp/<CTRL-D>
any-old-name/
^^^^^^^^^^^^^^^^^^^^^^
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>
Regards,
--
Geoff Wing : <gcw@pobox.com> Work URL: http://www.primenet.com.au/
Rxvt Stuff : <gcw@rxvt.org> Ego URL : http://pobox.com/~gcw/
Zsh Stuff : <gcw@zsh.org> Phone : (Australia) 0413 431 874
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-11-22 9:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-22 9:49 BUG: 3.1.6-pws-9: problems with fignore Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-11-22 2:48 Geoff Wing
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).