Expand description
Readline for Rust
This implementation is based on Antirez’s Linenoise
§Example
Usage
let mut rl = rustyline::Editor::<()>::new();
let readline = rl.readline(">> ");
match readline {
Ok(line) => println!("Line: {:?}", line),
Err(_) => println!("No input"),
}
Re-exports§
pub use config::ColorMode;
pub use config::CompletionType;
pub use config::Config;
pub use config::EditMode;
pub use config::HistoryDuplicates;
Modules§
- Completion API
- Customize line editor
- Contains error type for handling I/O and Errno errors
- Syntax highlighting
- Hints (suggestions at the right of the prompt as you type).
- History API
- Line buffer with current cursor position
Structs§
- Line editor
- Edited lines iterator
Enums§
- Where to paste (relative to cursor position)
- Where to move with respect to word boundary
- Vi character search
- Commands #[non_exhaustive]
- #[non_exhaustive]
- Where to move
- Different word definitions
Traits§
- Syntax specific helper.
Type Aliases§
- The number of times one command should be repeated.
- The error type for I/O and Linux Syscalls (Errno)