Native bindings to libreadline.
readline
and add_history
add_history_persist
preload_history
Add rl-sys
as a dependency in Cargo.toml
toml
[dependencies]
rl-sys = "0.2.2"
A simple implementation of echo
using rl_sys::readline
```rust
extern crate rl_sys;
fn main() { let prompt = String::from("$ "); loop { let response = match rl_sys::readline(prompt) { Ok(o) => match o { Some(s) => s, None => break, }, None => break, }; println!("{}", response); } } ```
Distributed under the MIT License.