shell: accept -- end-of-options delimiter in builtins - #33995
Open
robobun wants to merge 5 commits into
Open
Claude / Claude Code Review
completed
Jul 12, 2026 in 16m 25s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/shell/interpreter.rs:2580-2583 |
pwd/exit/export builtins still reject -- delimiter |
Annotations
Check warning on line 2583 in src/runtime/shell/interpreter.rs
claude / Claude Code Review
pwd/exit/export builtins still reject -- delimiter
nit: `pwd --`, `exit -- 5`, and `export --` still fail — pwd.rs:30 rejects any arg with "too many arguments", exit.rs matches on argc so 2 args errors, and export.rs iterates from 0 so it treats `--` as a var name. Bash accepts `--` for all three per POSIX Guideline 10. Since this PR already added the `--` skip to other builtins without flag parsers (basename, dirname, cd, which, yes), it'd be nice to cover these three too — or note them as intentionally deferred. Not blocking; the PR is a stric
Loading