Since a while, zsh does not complete anymore when used with some applications that open specific file types. For instance, when I write: xpdf <tab> I used to have a completion list containing all (and only) pdf files within the current directory. Now, nothing happens when using tab, as if the completion list were empty (even subdirectories are not listed). The same problem appears with acroread and gv. The bug does not affect all the applications: for instance emacs <tab> keeps printing the list of all possible completions. I observe the bug on at least two computers running a testing distribution. I tried removing .zshrc and creating a new one with the interactive wizzard offered by zsh at first login. The problem remains.
Did you try removing your .zcompdump file and restarting zsh?
I just tried: at first restart, zsh regenerates exactly the same .zcompdump and of course, the problem remains unsolved. By the way, I forgot to say that I observed the problem also with latex/pdflatex: latex <tab> does not propose any completion.
What output does <Ctrl-X><h> produce in that position?
Clint Adams a écrit :
tags in context :completion::complete:latex::
globbed-files (_files _tex (eval))
I get
tags in context :completion::complete:latex::
globbed-files (_files _tex (eval))
directories (_files _tex (eval))
all-files (_files _tex (eval))
Could you try the same after running
zsh -f
then
autoload -U compinit;compinit
Clint Adams a écrit : This time I get the same thing as you (and zsh propose me the good completion list).
Can you try adding things from your config one-by-one until you find the line that causes the problem?
Clint Adams <schizo@debian.org> a écrit : The line that causes trouble is the following: zstyle ':completion:*' file-sort access
*.(#i)pdf(oa#q-.)
I hope this does the right thing.
Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.45
diff -u -r1.45 _path_files
--- Completion/Unix/Type/_path_files 13 Mar 2009 09:59:58 -0000 1.45
+++ Completion/Unix/Type/_path_files 5 Aug 2009 00:23:32 -0000
@@ -160,7 +160,7 @@
if _have_glob_qual "$tmp1" complete; then
# unbalanced parenthesis is correct: match[1] contains the start,
# match[5] doesn't contain the end.
- tmp2+=( "${match[1]}${sort}${match[5]})" )
+ tmp2+=( "${match[1]}${match[5]})(${sort})" )
else
tmp2+=( "${tmp1}(${sort})" )
fi
Index: Completion/Unix/Type/_path_files
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Type/_path_files,v
retrieving revision 1.46
diff -u -r1.46 _path_files
--- Completion/Unix/Type/_path_files 5 Aug 2009 00:28:34 -0000 1.46
+++ Completion/Unix/Type/_path_files 5 Aug 2009 00:44:46 -0000
@@ -160,7 +160,7 @@
if _have_glob_qual "$tmp1" complete; then
# unbalanced parenthesis is correct: match[1] contains the start,
# match[5] doesn't contain the end.
- tmp2+=( "${match[1]}${match[5]})(${sort})" )
+ tmp2+=( "${match[1]}#q${sort})(${match[5]})" )
else
tmp2+=( "${tmp1}(${sort})" )
fi
Hi Sylvain, can you try to reproduce this issue, please? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535851
for me. These problems were caused by a faulty $FPATH. It contained the path "/usr/local/share/zsh/site-functions" (with "local"), so the functions in "/usr/share/zsh/site-functions" (without "local") were not found. Adding "/usr/share/zsh/site-functions" to $FPATH solved the problem. This does not explain all the effects that I have seen: On Bookworm completion is working in spite of the fact that $FPATH is faulty as well. Nor does it explain some of the effects described here. I do not know whether this is the same problem, but this information might help – and $FPATH should be fixed. Joerg Ebertz