Expand description
Strict moreutils-compat mode entry point.
Mirrors the rusty-sponge 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-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-018 note).
§Recognized inputs (Strict mode)
| input | behavior |
|---|---|
--suffix=<ext> | set tempfile suffix |
-- | end of options; rest are editor extras |
--strict / --no-strict | consumed by mode resolution upstream; ignored |
--help / --version | rejected per FR-013 via first-error formatter |
--editor / --editor=* | rejected per FR-013 via first-error formatter |
completions | rejected per FR-013 via first-error formatter |
other -x / --foo | first-error formatter (STF-003 option A) |
Enums§
- Unknown
Flag - The first unknown flag encountered by the Strict-mode parser.
Functions§
- format_
editor_ died - Moreutils-style “editor died” formatter per FR-018. Output matches the
Perl
dietemplate<argv joined> exited nonzero, aborting. - format_
unknown_ flag - First-error-only formatter for unknown short flags per FR-018.
- pre_
scan_ strict_ flag - Pre-clap scan for
--strict/--no-strictflags. Returns the resolved strict_flag value forcrate::mode::resolve(last occurrence wins). - run
- Strict-mode entry point. Bypasses clap entirely.