On Sun, Jan 28, 2024 at 5:10 PM <jwo@jwo.cz> wrote:
> POSIX Programmer's Manual (cd(1p) manpage) says this:
>
> [9 unrelated special cases]
>
> 10. The cd utility shall then perform actions equivalent to the
> chdir() function called with curpath as the path argument. If
> these actions fail for any reason, the cd utility shall
> display an appropriate error message and the remainder of
> this step shall not be executed. [...]
Right before that, it says in 8.c:
> If, as a result of this canonicalization, the curpath variable is null, no
> further steps shall be taken.
which is what happens in bash, busybox sh, dash, mksh, pdksh, oksh,
yash, zsh, and NetBSD sh.