Module rustyline
Interactive line editor for CLI applications.
- Crate
::rustyline. - docs.rs
- crates.io
- GitHub
rustyline is a Rust implementation of readline,
providing line editing, history, and completion
for interactive command-line programs.
It supports Emacs and Vi keybinding modes,
persistent file-based history,
and extensible completion and validation through helper traits.
The main type is DefaultEditor,
which reads lines from the terminal with editing support.
Examples
Reading lines in a loop with history:
use DefaultEditor;
use ReadlineError;
let mut rl = new.unwrap;
loop
Modules
- completion Completion API
- config Customize line editor
- error Contains error type for handling I/O and Errno errors
- highlight Syntax highlighting
- hint Hints (suggestions at the right of the prompt as you type).
- history History API
- line_buffer Line buffer with current cursor position
- validate Input validation API (Multi-line editing)
Structs
Traits
- Helper Syntax specific helper.
Type Aliases
-
DefaultEditor
Default editor with no helper and
DefaultHistory - Result The error type for I/O and Linux Syscalls (Errno)