Skip to main content

Module strict

Module strict 

Source
Expand description

Strict moreutils-compat mode entry point.

Mirrors the rusty-sponge/rusty-vipe strict.rs pattern: bypasses clap entirely (clap can’t produce byte-equal moreutils errors), runs a hand-rolled argv scan, emits moreutils-style stderr per FR-013 + FR-018.

§STF-003 option A

For any unknown flag, we emit ONLY the first unknown-flag error and exit non-zero. moreutils’ Perl Getopt::Long iterates per-character; we accept that as documented divergence (Strict-mode “moreutils-style” rather than “moreutils-byte-equal” — see FR-013 note).

§Recognized inputs (Strict mode)

inputbehavior
--end-of-options; rest are positional commands
--strict / --no-strictconsumed by mode resolution upstream; ignored
--capturerejected per FR-013/FR-018 (Rusty extension)
--help / --versionrejected per FR-013
completionsrejected per FR-013
other -x / --foofirst-error formatter (STF-003 option A)
positionalscommand strings, spawned via platform shell

Enums§

UnknownFlag
The first unknown flag encountered by the Strict-mode parser.

Functions§

format_spawn_failure
Moreutils byte-equal spawn-failure formatter per FR-009 + HINT-004.
format_unknown_flag
First-error-only formatter for unknown flags per FR-013.
pre_scan_strict_flag
Pre-clap scan for --strict / --no-strict flags. Last occurrence wins.
run
Strict-mode entry point. Bypasses clap entirely.