On Mon, Oct 28, 2013 at 4:30 PM, Eric Blake <ebl...@redhat.com> wrote: > 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).
Hi Eric, Since zsh's cd does not print anything by default, using "some" seemed appropriate; it is probably the second most popular login shell. Actually, I think the first incarnation of my log message used "Many", but I scaled it back when I tried it. Given that most shells ever linked to /bin/sh probably do have this feature, I'll revert to using the stronger word. Thanks, Jim