Crate linefeed [] [src]

Interactive input reader

Basic example

use linefeed::{Reader, ReadResult};

let mut reader = Reader::new("my-application").unwrap();

reader.set_prompt("my-app> ");

while let Ok(ReadResult::Input(input)) = reader.read_line() {
    println!("got input {:?}", input);
}

println!("Goodbye.");

Re-exports

pub use command::Command;
pub use complete::Completer;
pub use complete::Completion;
pub use complete::Suffix;
pub use function::Function;
pub use reader::Reader;
pub use reader::ReadResult;
pub use terminal::DefaultTerminal;
pub use terminal::Signal;
pub use terminal::Terminal;

Modules

chars

Provides utilities for manipulating character values

command

Defines the set of line editing commands

complete

Provides utilities for implementing word completion

function

Provides the Function trait for implementing custom Reader commands

inputrc

Parses configuration files in the format of GNU Readline inputrc

memory

Implements an in-memory Terminal interface

reader

Provides high-level line editing interface

table

Provides utilities for formatting strings in a table

terminal

Provides a low-level terminal interface

util

Provides miscellaneous utilities