Directory name completion

Tom H tomh0665 at gmail.com
Wed Jun 22 13:52:51 UTC 2011


On Wed, Jun 22, 2011 at 9:23 AM, Aaron Konstam <akonstam at sbcglobal.net> wrote:
> On Tue, 2011-06-21 at 16:31 -0430, Patrick O'Callaghan wrote:
>>
>> AFAIK $PATH has nothing to do with it. The appropriate variable is
>> $CDPATH and yes, the directory is in it.
>
> That is an interesting theory but I have no $CDPATH and the cd
> completion works on my machine.

$CDPATH does for directories what $PATH does for executables.

You can type "ip addr show" (rather than "/sbin/ip) when "/sbin/" is in $PATH.

You can type "cd tomh" (rather than "/root/path/to/poc/tomh") when
"/root/path/to/poc/" is in $CDPATH.

To the OP: CDPATH's tab completion's not working for me on F15. I've
never used tab completion this way before so it's a new "non-feature"
for me; I'm tempted to build an F14 VM to see it in action and to
compare the contents of their respective "/etc/bash_completion.d/".


More information about the users mailing list