OK, more clarification. I've used "zstyle ':completion:*:*:*:*:descriptions'". Now it seems that with the second completed path, the completion engine cannot decide between these two: % cd src/python -- directory after cdablevar -- -- local directory -- Frankly, I still don't understand what the problem is, because I'm *inside* a dir pointed to by a named directory (src/ in this case) and both "directory after cdablevar" and "local directory" are the same directory anyway. Peter сре, 11. авг 2021. у 22:03 Peter Slížik је написао/ла: > Sorry for the late reply, I tried both versions (with and without > parentheses). > > I tried to descend into 'src/python/api' by typing 'cd s', later with > src completed, 'cd src/py'. > Here are the results: using the value 'tag-order local-directories > named-directories' helped with completing src/, the directory name was > completed immediately upon hitting Tab. The second dir (python) was not > completed on the first Tab press. Typing another Tab did *not* produce a > list of suggestions. > > Here is the result of 'sr' and 'src/py'. > > % cd sr > tags in context :completion::complete:cd:: > local-directories named-directories (_cd) > users named-directories directory-stack (_tilde _cd) > users (_users _tilde _cd) > > % cd src/py > tags in context :completion::complete:cd:: > named-directories (_cd) > local-directories (_cd) > > % cd src/python/ > (no results) > > Do you think that there is anything suspicious? Personally I wonder why > there are duplicated entries in the first case and why are the tags listed > in a reversed order in the second case. And yes, the empty result list in > the last case. > > Peter > > сре, 4. авг 2021. у 19:26 Bart Schaefer је > написао/ла: > >> On Wed, Aug 4, 2021 at 9:50 AM Peter Slížik >> wrote: >> > >> > 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? >> >> Yes. The default is to offer all possible completions at the same >> time, but you can change that with the tag-order zstyle. >> >> The default behaves mostly like this: >> zstyle :completion::complete:cd:: tag-order "local-directories >> named-directories" >> (all tags in the same space-separated string are offered at the same time) >> >> What you want is more like this: >> zstyle :completion::complete:cd:: tag-order local-directories >> named-directories >> >> You can reverse the order if you prefer to see the named-directories >> first: >> zstyle :completion::complete:cd:: tag-order named-directories >> local-directories >> >> Anything in a tag you don't include in the list will be offered if >> there are no results for the tags you do list. >> >