Closed magicant closed 3 months ago
The recent changes introduce a new feature allowing the Yash shell to source an initialization file specified by the $ENV
environment variable upon startup. This enhancement streamlines user customization of the shell environment while improving error handling by explicitly rejecting invalid parameters. The changes significantly refactor several modules, enhancing code clarity and maintainability, particularly in the management of command-line arguments and environment configuration.
Files | Change Summary |
---|---|
yash-cli/CHANGELOG-bin.md , yash-cli/CHANGELOG-lib.md |
Added a feature to source initialization files based on $ENV and improved error handling for invalid parameters. |
yash-cli/src/lib.rs , yash-cli/src/startup.rs |
Refactored environment configuration logic, enhancing clarity and maintainability; renamed functions for better semantics. |
yash-cli/src/startup/init_file.rs |
Introduced functions for handling initialization files, including path resolution and execution. |
yash-env/CHANGELOG.md , yash-env/src/system.rs , yash-env/src/system/real.rs |
Enhanced user and group management capabilities with new types and methods in the System trait. |
yash-env/src/system/virtual.rs , yash-env/src/system/virtual/process.rs |
Updated VirtualSystem and Process struct to manage user and group IDs, ensuring better process identity handling. |
sequenceDiagram
participant User
participant Shell
participant InitFileManager
participant Env
User->>Shell: Start Shell
Shell->>Env: Read $ENV
Env-->>Shell: Return $ENV file path
Shell->>InitFileManager: Load Init File
InitFileManager-->>Shell: Execute Init File
Shell->>User: Shell Ready
Objective | Addressed | Explanation |
---|---|---|
Sourcing an initialization file specified by $ENV on startup (#384) |
✅ | |
Improve error handling for invalid parameters | ✅ |
🐰 "In the shell where commands bloom,
Initialization files find their room.
With each startup, a tailored spree,
No more errors, just joy and glee!
Hop along, dear script, and play,
As we frolic through this sunny day!" 🌼
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?
Closes #384
Summary by CodeRabbit
New Features
Bug Fixes
Tests