> If the program is a file beginning with ‘#!', the remainder of the first line specifies an interpreter for the program. The shell will execute the specified interpreter on operating systems that do not handle this executable format in the kernel.
Taking a quick look at the source in Src/exec.c:
execve(pth, argv, newenvp);
// [...]
if ((eno = errno) == ENOEXEC || eno == ENOENT) {
// [...]
if (ct >= 2 && execvebuf[0] == '#' && execvebuf[1] == '!') {
// [...]
(pprog = pathprog(ptr2, NULL))) {
I guess at some point someone added that `|| eno == ENOENT` and the docs weren't updated.