Commit acadc2a
feat: implement 2>&1 fd duplication and semicolon command separators
2>&1 fd duplication (external.rs):
- Track stdout's file handle via Option<File> alongside Stdio config
- On Output/Append/BothOutput redirects, clone file handle for tracking
- On ErrorToOutput (2>&1), try_clone from tracked handle instead of inherit()
- Fixes: `cmd > file 2>&1` now properly redirects stderr to same file
Semicolon command separators (parser.rs, repl.rs, enhanced_repl.rs):
- Add split_on_semicolons() that respects quotes, escapes, and parens
- Both basic and enhanced REPL split on unquoted semicolons before dispatch
- `cmd1; cmd2; cmd3` now executes sequentially (POSIX compliant)
- 10 unit tests covering quoting, escaping, command substitution edge cases
POSIX_COMPLIANCE.md updated to reflect both fixes.
Tests: 543 passing (10 new), 0 failures, 14 ignored
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent e15ec72 commit acadc2a
5 files changed
Lines changed: 426 additions & 519 deletions
0 commit comments