pub(super) fn with_exit_marker(
command: &str,
family: ShellFamily,
nonce: &str,
) -> StringExpand description
The command with an exit-code marker after it, in the shell’s own syntax,
tagged with this run’s nonce so no earlier run’s marker is taken for it.
cmd expands %ERRORLEVEL% when it reads the line, before the command runs,
so call with %^ERRORLEVEL% defers it; fish has $status for $?;
PowerShell reports a native command’s code in $LASTEXITCODE and a
cmdlet’s success in $?. The typed line itself never matches
exit_marker: it has %^ERRORLEVEL%, $?, $status or a $(...)
expression, not digits.