pushed
zhengqunkoo/codecrafters-shell-rust • 10:11 AM - Jan 24, 2026
This commit cleans up redirection handling in src/main.rs by separating built-in command output into distinct stdout and stderr buffers, then routing each one according to the parsed redirect target. Errors from commands like cd, pwd, and unknown commands no longer bypass redirection logic, and the shell now handles > vs 2> more consistently for both built-ins and external commands. The practical effect is that redirected output behaves much more like a real shell, especially in failure cases.