You are not logged in.

#1 2009-03-16 17:06:15

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

export CDPATH doesn't work?

I have been trying to put

export CDPATH=.:~:/etc:/var

or

export CDPATH=".:~:/etc:/var"

or

export CDPATH='$CDPATH.:~:/etc:/var'

in my .bashrc, so that I can "cd" more conveniently, but when I use "Tab" key, it doesn't auto complete the folder name? Am I doing something wrong? how to make it work?
hmm

Last edited by yingwuzhao (2009-03-16 17:23:45)

Offline

#2 2009-03-16 17:11:52

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: export CDPATH doesn't work?

What's the output if you try cd'ing into any of those (~,/etc,/var)?

Also, there's a great little utility called autojump which does exactly what you want and much more: link

Offline

#3 2009-03-16 17:22:45

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Re: export CDPATH doesn't work?

Hi, I am sorry let me rephrase my question: when I use "Tab" key, it doesn't auto complete the folder name,
is there any way to make this work?

Offline

#4 2009-03-16 19:02:28

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

Re: export CDPATH doesn't work?

Oh! I'm sorry, seems I didn't read well enough again. tongue

Do you have the bash-completion package installed and sourced /etc/bash_completion in your .bashrc? I just tested it and it works that way. Extension of CDPATH seems to be considered extended functionality.

Thanks for introducing me to this, though - will save me from quite some typing. smile

Offline

#5 2009-03-17 05:56:13

yingwuzhao
Member
Registered: 2009-01-13
Posts: 109

Re: export CDPATH doesn't work?

hey, thanks, that helps!

Now I use soft links, which gives me same functionality, too.
big_smile

Last edited by yingwuzhao (2009-03-17 05:56:28)

Offline

Board footer

Powered by FluxBB