On my current system (openSUSE 12.3 with zsh 5.0.2) the autocomplete function does not give me a choice of possible completions if I have already entered a possible completion match.

For example, if I am in a directory with two files named file and file2 and I type:

cat file<TAB>

Then a space will be appended, and I will have no indication that file2 was also a possible match. Is it possible to change this behaviour? Bash behaves better in this case (it will show both file and file2 without adding a space), but any solution that does not hide possible matches would also be interesting.

2 Answers 2


zstyle ':completion:*' accept-exact false

from zshcompsys(1)

              This  is  tested for the default tag in addition to the tags valid for the current context.  If it is set to `true' and any of the trial matches is the
              same as the string on the command line, this match will immediately be accepted (even if it would otherwise be considered ambiguous).

You can also make the zstyle's context more specific instead of it affecting every type of completion.


It is certainly possible, because I also have zsh 5.0.2 on openSUSE 12.3, and my zsh behaves exactly the way you want. Unfortunately I can't remember which setting in my .zshrc does the trick, but you can look at it yourself and hopefully you will be able to figure it out. I'm guess it's either one of the setopt options, or one of the zstyle lines, but it's years since I wrote most of those ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .