Zsh have "files" plugin includeing "mkdir" buiiltin. When using mkdir -p then, the builtin version fails on partially symlik-ed path. E. g. when /home is symlink-> /var/home, any first completion spams a "_store_cache:mkdir:16: cannot make directory `/home': file exists" message when trying to create $HOME/.zcompcache. Look at this part of zsh-4.3.0-20050611/Src/Modules/files.c: 121 domkdir(char *nam, char *path, mode_t mode, int p) 122 { 123 int err; 124 mode_t oumask; 125 char const *rpath = unmeta(path); 126 127 if(p) { 128 struct stat st; 129 130 if(!lstat(rpath, &st) && S_ISDIR(st.st_mode)) 131 return 0; 132 } Here must be "stat" instead of "lstat", mustn't it? Steps to Reproduce: 0. mv /home /var/home; ln -s /var/home /home # do it carefully :) 1. rm -rf ~/.zcompcache 2. apt-cache search a<TAB> Actual Results: see message, no ~/.zcompcache is created Expected Results: see no messages, ~/.zcompcache is created
Fixed in zsh-4.3.0-alt0.2.