Updated readme and examples

This commit is contained in:
Chris 2024-02-28 12:44:09 +01:00
parent 14f1d7f0cf
commit 24b7a79827
2 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ $ composer require noccylabs/react-shell:@dev
## Features
* Interactive line-editing including arrow keys, home, end, delete and all the commodities you are used to.
* Automatic scrollback history, to avoid having to retype commands.
* Input is edited on a single scrolling line.
* Mostly Unicode-aware, meaning it will not have a nervous breakdown if you try to enter (single-width LTR) unicode characters.

View File

@ -17,7 +17,7 @@ $commands->on('command', function ($command, $args, $shell) {
$shell->write("Arguments passed: ".json_encode($args)."\n");
});
$shell->on('prompt', function ($shell) {
$shell->setPrompt(date(">> "));
$shell->on('prompt', function ($shell) {
$shell->setPrompt(">> ");
});
$shell->on('input', $commands);