Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using zsh and I always were able to cd right into paths that are part of my CDPATH configuration but, starting a few days ago, the completion stopped working.

mbp:~ $ echo $CDPATH

CDPATH is still working:

mbp:~ $ pwd
mbp:~ $ cd rackapp
mbp:rackapp(master) $ pwd

But if I do cd rack and hit tab, no suggestions appear. Before, it would show all subdirectories of either ~/Projects, ~/code or ~ that would match "rack*".

Any ideas of what could have happened?

share|improve this question
I discovered this just stopped working for me as well. Are you using Oh My ZSH? I am and am wondering if that is the link. – localshred Dec 10 '12 at 21:02
Yes I am @localshred, but I don't remember updating it... – kolrie Dec 11 '12 at 0:23

try adding

typeset -U path cdpath fpath

to the bottom of your .zshrc/.zshenv file, as that worked for me.

share|improve this answer
This works, but...why? I'm looking it up, but a bit of explanation would be helpful. – Rob Wilkerson Jan 21 '13 at 12:41

Try adding this to your .zshrc:

zstyle ':completion:*:complete:(cd|pushd):*' tag-order \
'local-directories named-directories path-directories'

path-directories are directories from CDPATH, which the command above adds to zsh's completion for cd/pushd. This is from: this answer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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