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

After reading this article, I set CDPATH=.:~. However, I do not have tab completion through the directories in my home directory. I was wondering if anyone was aware of ways to do this.

share|improve this question
I don't think that setting CDPATH gives you tab completion. It allows you to cd to a sub-directory of any of the directories listed by just entered the sub-directory name. – dmah Nov 30 '10 at 17:55
On my Ubuntu desktop system, I can type "cd D" (in a directory other than ~) and press Tab twice and see "Desktop/ Documents/ Downloads/" as proposed destinations. Do you not get similar behavior? – Dennis Williamson Nov 30 '10 at 18:24
up vote 9 down vote accepted

You should install and enable bash-completion — it defines a _cd function and sets it as the completer for the cd command, which overrides the default completion and includes $CDPATH.

share|improve this answer
+1 for just giving me hope! I'll try it. – Belmin Fernandez Nov 30 '10 at 22:07
Worked like a charm! – Belmin Fernandez Dec 2 '10 at 1:53

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.