3
3
Async, event-driven and UTF-8 aware console input & output (STDIN, STDOUT),
4
4
built on top of for [ ReactPHP] ( https://reactphp.org ) .
5
5
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
+
6
13
** Table of contents**
7
14
8
15
* [ Quickstart example] ( #quickstart-example )
@@ -407,8 +414,8 @@ $readline->setAutocomplete(function () {
407
414
});
408
415
```
409
416
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,
412
419
so that the resulting input buffer is ` hello ` .
413
420
414
421
If 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
427
434
input buffer is ` hello exit ` , which may or may not be what you need depending
428
435
on your particular use case.
429
436
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
431
438
actually receives three arguments (similar to ` ext-readline ` 's
432
439
[ ` readline_completion_function() ` ] ( http://php.net/manual/en/function.readline-completion-function.php ) ):
433
440
The first argument will be the current incomplete word according to current
@@ -518,7 +525,7 @@ This project follows [SemVer](http://semver.org/).
518
525
This will install the latest supported version:
519
526
520
527
``` bash
521
- $ composer require clue/stdio-react:^1.2
528
+ $ composer require clue/stdio-react:^2.0
522
529
```
523
530
524
531
See also the [ CHANGELOG] ( CHANGELOG.md ) for details about version upgrades.
0 commit comments