Skip to content

cdr recent directories / files not shown in cd completion on Arch Linux when using zsh-autocomplete #837

@donnerslay

Description

@donnerslay

Environment

% typeset -p1 VENDOR OSTYPE ZSH_PATCHLEVEL _autocomplete__funcfiletrace
typeset OSTYPE=linux-gnu
typeset ZSH_PATCHLEVEL=zsh-5.9-0-g73d3173
typeset -a _autocomplete__funcfiletrace=(
  /home/tutuer/.oh-my-zsh/custom/plugins/zsh-autocomplete/zsh-autocomplete.plugin.zsh:4
  /home/tutuer/.oh-my-zsh/oh-my-zsh.sh:175
  /home/tutuer/.oh-my-zsh/oh-my-zsh.sh:204
  /home/tutuer/.zshrc:34
  zsh:0
)

% git -C ~autocomplete log --oneline -n1
bbba73e (HEAD -> main, origin/main, origin/HEAD) Add support for tiny terminals
  • Operating system: Arch Linux, Kernel: Linux 6.12.18-1-lts
  • Terminal emulator: Alacritty

Steps to reproduce

% cd $(mktemp -d)
/tmp/tmp.5h4ZRtdXwA 
% git clone --depth 1 -- https://github.com/marlonrichert/zsh-autocomplete.git
Cloning into 'zsh-autocomplete'...
remote: Enumerating objects: 54, done.
remote: Counting objects: 100% (54/54), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 54 (delta 0), reused 31 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (54/54), 1.64 MiB | 11.33 MiB/s, done.
% > .zshrc <<EOF
setopt interactivecomments transientrprompt
PS1='%# '
PS2=
RPS2='%^'
source $PWD/zsh-autocomplete/zsh-autocomplete.plugin.zsh
EOF
% env -i HOME=$PWD PATH=$PATH TERM=$TERM ${TERMINFO:+TERMINFO=$TERMINFO} zsh -d
% ls
% mkdir foo
% cd foo
% mkdir boo
% cd boo
% cd ../..
% cd boo
% cd <TAB>
# Expected:
#   cd <TAB> should show the recent directory ./foo/boo from cdr
#
# Actual:
#   Only "foo/" is shown. No recent directory entries appear.

# Note:
#   In .zsh the `cdr` is enabled.
#   Pressing Ctrl+x+/ in shell correctly shows the list of recent directories,
#   which means the cdr database itself is working.
#   However, when using `cd` with zsh-autocomplete, the recent
#   directories never appear — only directories from the current path
#   are shown.
#
#   This problem occurs only on my Arch Linux system. On my previous
#   Linux Mint setup, cd-completion worked out of box without additional configuration.
Contents of ~autocomplete-log/2025-12-10.log (click to expand)
compadd:109: _autocomplete__compadd_opts_len: function definition file not found
compadd:compadd:110: unknown match specification character `_'
compadd:109: _autocomplete__compadd_opts_len: function definition file not found
compadd:109: _autocomplete__compadd_opts_len: function definition file not found

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions