News for hackers. Stuff that matters.
Re:Effective Shell by chasil on Wednesday June 22, 2022 @05:39PM (#31842194)
From the wiki, command.com did not run pipelines in parallel, and in consequence could not redirect standard error:

"For example, on OS/2 and Windows, it can use real pipes in command pipelines, allowing both sides of the pipeline to run concurrently. As a result, it is possible to redirect the standard error stream. (COMMAND.COM uses temporary files, and runs the two sides serially, one after the other.)"

Obviously, this process and I/O management would require a massive rewrite, sufficient to make cmd.exe a new (but somewhat compatible) implementation. This was not possible in DOS or CP/M.

Delayed variable expansion, pushd/popd, file name completion, expression evaluation and improved control structures are all fundamental changes that are strongly influenced by the Berkeley C Shell written by Bill Joy. The wiki specifically mentions the C Shell.

The 8086(/8) binary for command.com is not found in modern windows (I think the "wow16" layer was removed from 64-bit windows); cmd.exe is a 32-bit binary running under wow32, which it must be to invoke these new features in system calls that could not exist in DOS.

The wiki says this about the relation between command.com and cmd.exe:

"cmd.exe is the counterpart of COMMAND.COM in DOS and Windows 9x systems, and analogous to the Unix shells used on Unix-like systems."

I think that very little source code from command.com ended up in cmd.exe.

Re:Effective Shell by layer8 on Wednesday June 22, 2022 @06:31PM (#31842695)
Yeah, I didn’t mean it in terms of of source code and implementation, and certainly a lot of features were added since DOS, but since both OS/2 and Windows (NT) were intended to be successors of DOS, their shell took over the syntax and conventions of the DOS shell.
Re:Effective Shell by chasil on Wednesday June 22, 2022 @06:53PM (#31842928)
...but also some of Bill Joy's influence as well.

It is compatible with, but distinct from what preceded it.