Closed magicant closed 3 months ago
The changes introduce a new crate, yash-prompt
, for prompt strings following POSIX expansion standards. It adds build and test commands, updates several dependencies, implements new functionality for prompt handling, and integrates yash-prompt
with yash-cli
. The alterations include function signature updates, new modules, and modified imports to support prompt decoration in the interactive shell environment.
Files / Folders | Summary of Changes |
---|---|
check-extra.sh |
Added build and test commands for yash-prompt . |
check-msrv.sh |
Updated workspace members for testing yash-prompt . |
yash-prompt/CHANGELOG.md |
Introduced initial changelog documentation for yash-prompt . |
yash-prompt/Cargo.toml |
Defined package dependencies and configurations. |
yash-prompt/LICENSE-GPL |
Added GPL v3 license document. |
yash-prompt/README.md |
Introduced crate features, badges, and license info. |
yash-prompt/src/expand_posix.rs |
Implemented POSIX prompt expansion with new function signature. |
yash-prompt/src/lib.rs |
Added library entry point, exporting expand_posix and Prompter . |
yash-prompt/src/prompter.rs |
Implemented Prompter decorator for displaying shell prompts. |
yash-cli/Cargo.toml |
Added yash-prompt as a dependency. |
yash-cli/src/startup.rs |
Conditional prompt decoration applied in prepare_input function. |
sequenceDiagram
participant User
participant CLI
participant Prompter
participant Env
participant PosixExpander
User->>CLI: Start interactive shell
CLI->>Prompter: Apply prompt decorator
Prompter->>Env: Retrieve prompt template ($PS1)
Prompter->>PosixExpander: Expand POSIX prompt
PosixExpander->>Prompter: Return expanded prompt
Prompter->>CLI: Display prompt
User->>CLI: Enter command
CLI->>Prompter: Remove prompt decorator
CLI->>Env: Execute command
Env-->>CLI: Command result
CLI-->>User: Output result
yash-prompt
crate addresses several features related to prompt expansion and interaction required for the first beta release.In the realm of shells so bright,
A prompt awakens, shining light,
With POSIX rules, it doth expand,
To greet each command at your hand.
In code it whispers, "Here I stand,"
Ready to serve in interactive land.
The future smiles at this prompt's command.🐇💻✨
[!TIP]
AI model upgrade
## `gpt-4o` model for reviews and chat is now live OpenAI claims that this model is better at understanding and generating code than the previous models. Please join our [Discord Community](https://discord.com/invite/GsXnASn26c) to provide any feedback or to report any issues.
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 is part of #372. This PR only supports
$PS1
.yash-prompt
cratePrompter
input decoratorPrompter
decoratorSummary by CodeRabbit
New Features
yash-prompt
package for enhanced command prompt functionality.Documentation
README.md
andCHANGELOG.md
foryash-prompt
.yash-prompt
.Refactor
yash-cli
to useyash-prompt
for command prompt implementation.prepare_input
function to conditionally apply thePrompter
decorator.Tests
yash-prompt
functionalities.