Skip to content

shell: name the rejected flag in the builtins' illegal option errors - #39230

Open
robobun wants to merge 5 commits into
mainfrom
farm/5c52e3c5/shell-illegal-option-char
Open

shell: name the rejected flag in the builtins' illegal option errors#39230
robobun wants to merge 5 commits into
mainfrom
farm/5c52e3c5/shell-illegal-option-char

shell: carry the rejected option byte as a u8 through the flag parsers

dbb0c10
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 16, 2026 in 10m 20s

Code review found 2 potential issues

Found 2 candidates, confirmed 2. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 1
Severity File:Line Issue
🟡 Nit src/runtime/shell/interpreter.rs:2323-2326 unsupported_flag() is now an identity function

Annotations

Check warning on line 2326 in src/runtime/shell/interpreter.rs

See this annotation in the file changed.

@claude claude / Claude Code Review

unsupported_flag() is now an identity function

`unsupported_flag()` is now the identity function `name -> name` after this PR changed `ParseFlagResult::Unsupported` from `*const [u8]` to `&'static [u8]`. Per REVIEW.md's "delete dead code in the same PR that makes it dead", the helper and its ~26 call sites in cat.rs/cp.rs/mkdir.rs/touch.rs could pass the byte literal directly (e.g. `Some(ParseFlagResult::Unsupported(b"-b"))`).