On 10/28/2013 05:10 PM, Jim Meyering wrote: > > * gnulib-tool: Some "cd" built-in functions print a directory name > to stdout when CDPATH is set, e.g.,
More precisely, _all_ posix-conforming cd implementations are required to write to stdout if CDPATH had an effect. It's more than just "some". > +++ b/gnulib-tool > @@ -898,6 +898,9 @@ if test "X$1" = "X--no-reexec"; then > shift > fi > > +# Unset CDPATH. Otherwise, output from the 'cd dir' can surprise callers. > +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH This comment wording is also a nicer alternative (by bypassing any implication on how many shells give output and without a judgment on whether such behavior is wrong, when it is clearly required by posix). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature