diff --git a/README.md b/README.md index b68cd2e..2364bad 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/examples/commands.php b/examples/commands.php index b69ed8c..7402d2a 100644 --- a/examples/commands.php +++ b/examples/commands.php @@ -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);