1.5.25-15: Bash: Changing directory very slow (hang) without leading path

Eric Blake ebb9@byu.net
Tue Dec 9 03:41:00 GMT 2008

Hash: SHA1

According to Jake Hawkes on 12/8/2008 8:29 PM:
> In bash, when changing to any directory (except parent via ..) it
> takes a very long time, or hangs.

Without looking, I'm guessing that you have CDPATH set, and that it
includes a network path.

> If a prepend with a path, e.g. ./ or ../dir1/dir2 it works immediately.

Prepending . or .. disables CDPATH searching.

> I've included my cygcheck output.
> CDPATH = 'D:\'
> d:  cd             N/A    N/A

I almost had it.  bash is checking your cdrom drive for a possible match
on every unanchored cd call.  Also, I have never tested CDPATH with a
DOS-style path, but it certainly doesn't help matters.  If you still want
to use CDPATH in bash, at least convert it to a cygwin-style /cygdrive/d,
not d:\.  But most likely, since CD paths tend to be transient, you are
better off unsetting it altogether.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

More information about the Cygwin mailing list