rustyline-with-newest-nix 12.0.0

Rustyline, a readline implementation based on Antirez's Linenoise
Documentation
1
2
3
4
5
6
7
8
9
10
11
use rustyline::{DefaultEditor, Result};

/// Minimal REPL
fn main() -> Result<()> {
    env_logger::init();
    let mut rl = DefaultEditor::new()?;
    loop {
        let line = rl.readline("> ")?; // read
        println!("Line: {line}"); // eval / print
    } // loop
}