I'm on Win7 x64, Cygwin 1.7 and zsh (and using oh-my-zsh). Zsh newbie here.

I've reviewed zsh autocompletion not working on cygwin and tried the solution there but no luck.

My mount table:

 C: on /c type ntfs (binary,posix=0,user,noumount,auto)
 D: on /d type ntfs (binary,posix=0,user,noumount,auto)
 F: on /f type ntfs (binary,posix=0,user,noumount,auto)

As you can see, I'm using /c, /d and /f for my drives. Part of the reason to change this from the default /cygdrive prefix is to maintain compat with Msysgit

Unfortunately after changing the drive prefix, zsh completion doesn't work

typing cd /f/code/Por<tab> no longer completes the folder or present options. It works fine in Bash though :(

If I cd into /f and then type cd Por - completion works.

How do I make it work everywhere?


This solution has the drawback of having to specify each and every drive, but it works for me:

zstyle ':completion:*' fake-files   '/:c' '/:d'

I had a similar problem. If found out a solution: http://blog.en.edaro.net/2014/01/fix-broken-autocompletion-with-zsh-in.html

In my situation, the problem occurs only, when running cygwin as another user as you installed cygwin. And it may only occur, when this running user is an administrator (not tested with unprivileged user). The problem may be: As Administrator, you can "always" modify files, even if chmod disallows this. compinit does not know about this situation (its a unix app), but it finds out, that you have write acess to it - that's the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.