clue / readline-react
Experimental bindings for the readline extension (ext-readline)
dev-master
2017-01-29 13:29 UTC
Requires
- php: >=5.3
- ext-readline: *
- evenement/evenement: ~1.0|~2.0
- react/event-loop: ~0.3.0|~0.4.0
This package is auto-updated.
Last update: 2024-07-06 08:34:19 UTC
README
clue/readline-react ![Build Status](https://camo.githubusercontent.com/e45e25bd8882b961ca730eaeae326cc38f62db851426c520ed59766c27d99014/68747470733a2f2f7472617669732d63692e6f72672f636c75652f7068702d726561646c696e652d72656163742e7376673f6272616e63683d6d6173746572)
Experimental bindings for the readline extension (ext-readline)
Note: This project is in early alpha stage! Feel free to report any issues you encounter.
Quickstart example
Once installed, you can use the following code to present a prompt in a CLI program:
$readline = new Readline($loop, 'demo > '); $readline->on('line', function ($line) use ($readline) { var_dump($line); if ($line === 'quit' || $line === 'exit') { $readline->pause(); } });
See also the examples.
Install
The recommended way to install this library is through composer. New to composer?
{ "require": { "clue/readline-react": "dev-master" } }
License
MIT