Fixed line scrolling, prompt style
This commit is contained in:
@ -10,9 +10,11 @@ $shell = new NoccyLabs\React\Shell\Shell();
|
||||
$commands = new CommandHandler();
|
||||
$commands->add('help', function ($args, $shell) {
|
||||
$shell->write("This could be usage help :)\n");
|
||||
$shell->write("Exit by pressing ^C\n");
|
||||
});
|
||||
$commands->on('notfound', function ($command, $shell) {
|
||||
$shell->write("Command not found: {$command}. Try help\n");
|
||||
$commands->on('command', function ($command, $args, $shell) {
|
||||
$shell->write("Bad command '{$command}', try help.\n");
|
||||
$shell->write("Arguments passed: ".json_encode($args)."\n");
|
||||
});
|
||||
|
||||
$shell->on('prompt', function ($shell) {
|
||||
|
Reference in New Issue
Block a user