Closed magicant closed 9 months ago
The yash
shell has been updated to include the source
built-in command, allowing users to execute commands from a file within the current shell environment. This feature is gated by the yash-semantics
feature flag. The update includes parsing logic, error handling, environment stack adjustments, and new tests to ensure the functionality works as expected.
File Path | Change Summary |
---|---|
yash-builtin/src/lib.rs |
Added source module and command, conditional on yash-semantics feature. |
yash-builtin/src/source.rs yash-builtin/src/source/semantics.rs yash-builtin/src/source/syntax.rs |
Implemented source built-in command with parsing, execution logic, and error handling. |
yash-env/src/stack.rs |
Added DotScript variant to Frame enum and updated loop_count method. |
yash-syntax/src/source.rs yash-syntax/src/source/pretty.rs |
Updated Source enum with DotScript variant and display logic. |
yash/tests/scripted_test.rs yash/tests/scripted_test/source-p.sh |
Added new tests for the source built-in functionality. |
yash/tests/scripted_test/redir-p.sh yash/tests/scripted_test/return-p.sh |
Script changes related to built-in commands and test cases. |
🐇✨ In the shell of yash, a new dawn breaks, 'source' command, a journey it takes. Files come alive with a dot and a name, CodeRabbit hops on, acclaiming its fame. 🎉 ✨🐇
Implements the
.
built-in for POSIX conformance.Summary by CodeRabbit
New Features
source
built-in command, allowing users to execute commands from a file within the current shell environment.Enhancements
source
built-in to handle errors more effectively.Testing
source
built-in command.Documentation
source
built-in command and its usage.Bug Fixes
source
built-in.Refactor