Closed magicant closed 2 weeks ago
The changes involve significant enhancements to the interactive shell functionality of the yash-cli
project. Key updates include improved error handling, the introduction of a new interactive read-eval loop, and refined user experience features that allow the shell to handle errors without terminating. Additionally, new tests have been added to validate error handling scenarios, and several functions have been renamed or modified to support these improvements.
Files | Change Summary |
---|---|
yash-cli/CHANGELOG-bin.md |
Enhanced interactive shells to prevent exiting on errors; improved error handling for parameter expansion. |
yash-cli/CHANGELOG-lib.md |
Updated shell to load initialization files; replaced read_eval_loop with interactive_read_eval_loop . Renamed bin_main to main with a new return type. |
yash-cli/src/lib.rs |
Modified parse_and_print to conditionally call interactive or non-interactive loops based on environment. |
yash-cli/tests/scripted_test.rs |
Added error_consequences_ex test function for additional error handling scenarios. |
yash-cli/tests/scripted_test/error-p.sh |
Removed comments about unimplemented interactive shell features. |
yash-cli/tests/scripted_test/error-y.sh |
Introduced comprehensive tests for error handling in both interactive and non-interactive modes. |
yash-semantics/CHANGELOG.md |
Added interactive_read_eval_loop for interactive environments; improved error handling in the expansion module. |
yash-semantics/Cargo.toml |
Added async-trait as a new development dependency. |
yash-semantics/src/lib.rs |
Exported interactive_read_eval_loop from the runner module. |
yash-semantics/src/runner.rs |
Introduced interactive_read_eval_loop and refined command execution logic based on interactivity. |
yash-semantics/src/runner_legacy.rs |
Removed TODO comment regarding interrupt behavior in interactive shells. |
🐰 In the shell so bright and new,
With errors handled, we leap and chew!
Interactive joy, no more abrupt ends,
Bugs are squashed, and code now blends.
Hopping through tests, a happy delight,
Celebrating changes, our future is bright! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
This pull request implements the behavior of interactive shells that do not exit on shell errors like syntax errors, parameter expansion errors, and special built-in utility errors.
Summary by CodeRabbit
New Features
Bug Fixes
Tests