Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
/Users/fcoury/Projects:/Users/fcoury:/Users/fcoury/code

CDPATH is still working:

mbp:~ $ pwd
/Users/fcoury
mbp:~ $ cd rackapp
~/Projects/rackapp
mbp:rackapp(master) $ pwd
/Users/fcoury/Projects/rackapp

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

2 Answers 2

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

try adding

typeset -U path cdpath fpath

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

share|improve this answer
4  
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

Your Answer

 
discard

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.