+2010-07-29 Eric Blake <eblake@redhat.com>
+
+ docs: mention cd limitation
+ * doc/autoconf.texi (Limitations of Builtins) <cd>: Document
+ issues with empty argument.
+
2010-07-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Add missing index entries to manual.
variables like @code{ac_top_srcdir} (@pxref{Configuration Actions}),
so it is safe to @command{cd} to these variables.
+Posix states that behavior is undefined if @command{cd} is given an
+explicit empty argument. Some shells do nothing, some change to the
+first entry in @env{CDPATH}, some change to @env{HOME}, and some exit
+the shell rather than returning an error. Unfortunately, this means
+that if @samp{$var} is empty, then @samp{cd "$var"} is less predictable
+than @samp{cd $var} (at least the latter is well-behaved in all shells
+at changing to @env{HOME}, although this is probably not what you wanted
+in a script). You should check that a directory name was supplied
+before trying to change locations.
+
See @xref{Special Shell Variables}, for portability problems involving
@command{cd} and the @env{CDPATH} environment variable.
Also please see the discussion of the @command{pwd} command.