33Async, event-driven and UTF-8 aware console input & output (STDIN, STDOUT),
44built on top of for [ ReactPHP] ( https://reactphp.org ) .
55
6+ You can use this library to build truly interactive and responsive command
7+ line (CLI) applications, that immediately react when the user types in
8+ a line. Inspired by ` readline ` , but supports UTF-8 and interleaved I/O
9+ (typing while output is being printed), history and autocomplete support
10+ and takes care of proper TTY settings under the hood without requiring
11+ any extensions or special installation.
12+
613** Table of contents**
714
815* [ Quickstart example] ( #quickstart-example )
@@ -407,8 +414,8 @@ $readline->setAutocomplete(function () {
407414});
408415```
409416
410- If the user types ` he [TAB] ` , the first match will be skipped as it does not
411- match the current word prefix and the second one will be picked automatically,
417+ If the user types ` he [TAB] ` , the first two matches will be skipped as they do
418+ not match the current word prefix and the last one will be picked automatically,
412419so that the resulting input buffer is ` hello ` .
413420
414421If the user types ` e [TAB] ` , then this will match multiple entries and the user
@@ -427,7 +434,7 @@ This means that if the user types `hello [SPACE] ex [TAB]`, then the resulting
427434input buffer is ` hello exit ` , which may or may not be what you need depending
428435on your particular use case.
429436
430- In order to give your more control over this behavior, the autocomplete function
437+ In order to give you more control over this behavior, the autocomplete function
431438actually receives three arguments (similar to ` ext-readline ` 's
432439[ ` readline_completion_function() ` ] ( http://php.net/manual/en/function.readline-completion-function.php ) ):
433440The first argument will be the current incomplete word according to current
@@ -518,7 +525,7 @@ This project follows [SemVer](http://semver.org/).
518525This will install the latest supported version:
519526
520527``` bash
521- $ composer require clue/stdio-react:^1.2
528+ $ composer require clue/stdio-react:^2.0
522529```
523530
524531See also the [ CHANGELOG] ( CHANGELOG.md ) for details about version upgrades.
0 commit comments