Ok, my suspicion is that the problem occurs if the completed name can expand to both a named directory and a local directory.

My directory structure:
/workdirs/projects/myproject/src/python/mymodule/submodule

# Define a named directory
src=/workdirs/projects/myproject/src
: src

# cd inside the tree
cd /workdirs/projects/myproject

# try to go deeper
cd sr<Tab>      # completes 'sr' to 'cd src' (without a slash)
cd src<Tab>    # another tab - emits a bell sound
cd src<Tab>    # yet another tab - add a slash: 'src/'

It seems like the completion engine cannot choose between the named directory and a local directory of the same name. In reality, they point to the same dir.

Is there a way to fix this behavior?
I'm using a lot of named directories, they are very convenient. In fact, they are the main reason I switched to zsh.

Peter

Here,

сре, 4. авг 2021. у 17:45 Bart Schaefer <schaefer@brasslantern.com> је написао/ла:
On Wed, Aug 4, 2021 at 8:02 AM Peter Slížik <peter.slizik@gmail.com> wrote:
>
> As I said, I have a lot of settings in my .zshrc and I don't know which of them could make the change in completion behavior. Could you kindly point me where to start or how to trace the problem?

The place to start is nearly always to first type ctrl+x h instead of
tab, to get a description of the context, and if that doesn't help,
type ctrl+x question-mark in place of tab, to invoke completion
debugging, which leaves a trace file in /tmp.