Expand description
The machinery Windows shells share (path handling, external execution, redirect I/O). The shared Windows shell machinery.
PowerShell and cmd both need the same things to run a Windows command: resolve a name through the command table, record the invocation as a real process, execute it with the standard streams, and finish the process record — plus Windows path handling and redirect I/O. This module is the single implementation of that machinery; the shells keep their own languages, builtins, and parsing, and delegate the rest here.
Functions§
- display_
path - The Windows display form of an engine path:
C:\Users\Rey. - read_
redirect - Reads a redirect input file’s bytes.
- resolve_
path - Resolves a path argument against a working directory, accepting
Windows path syntax: backslashes, drive prefixes (
C:\Users\Rey), forward slashes, and trailing separators are all normalized to the engine’s slash form. - run_
external - Runs one external command: resolves it through the command table,
records the invocation in the process namespace (
tasklistobserves it), executes it with the given streams, and finishes the record. - write_
redirect - Writes redirect output to the virtual filesystem, creating the file (under its parent, which must exist) when needed.