sh: Implement the cd -e flag proposed for the next POSIX issue.
authorPeter Avalos <pavalos@dragonflybsd.org>
Tue, 5 Jul 2011 03:40:08 +0000 (17:40 -1000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sun, 21 Aug 2011 20:49:07 +0000 (13:49 -0700)
commit8c603ea46b38bbd10c1adbb01739f179e69edf99
tree83082122fd3e11e5681448610e42e52713a1cfad
parentb50bb77759a611b50deb3e3ef5bc45c0186bc553
sh: Implement the cd -e flag proposed for the next POSIX issue.

This reflects failure to determine the pathname of the new directory in
the exit status (1). Normally, cd returns successfully if it did
chdir() and the call was successful.

In POSIX, -e only has meaning with -P; because our -L is not entirely
compliant and may fall back to -P mode, -e has some effect with -L as
well.

Obtained-from:   FreeBSD SVN rev 222154
bin/sh/cd.c
bin/sh/sh.1
tools/regression/bin/sh/builtins/cd3.0 [new file with mode: 0644]
tools/regression/bin/sh/builtins/cd4.0 [new file with mode: 0644]