Crate rustyline_with_hint_fix
source ·Expand description
Readline for Rust
This implementation is based on Antirez’s Linenoise
Example
Usage
let mut rl = rustyline::DefaultEditor::new()?;
let readline = rl.readline(">> ");
match readline {
Ok(line) => println!("Line: {:?}", line),
Err(_) => println!("No input"),
}Re-exports
pub use crate::config::Behavior;pub use crate::config::ColorMode;pub use crate::config::CompletionType;pub use crate::config::Config;pub use crate::config::EditMode;pub use crate::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
- Input validation API (Multi-line editing)
Structs
- Undo manager
- Completion/suggestion context
- Line editor
- EventContext
custom-bindingsGive access to user input. - Input key pressed and modifiers
- The set of modifier keys that were triggered along with a key press.
Enums
- Where to paste (relative to cursor position)
- Where to move with respect to word boundary
- character search
- Commands
- Event
custom-bindingsInput event - EventHandler
custom-bindingsEvent handler - Vi input modes
- Input key pressed
- Where to move
- Different word definitions
Traits
- ConditionalEventHandler
custom-bindingsMay behave differently depending on: - External printer
- Syntax specific helper.
Type Definitions
- Default editor with no helper and
DefaultHistory - The number of times one command should be repeated.
- The error type for I/O and Linux Syscalls (Errno)
Derive Macros
- Completer
derive - Helper
derive - Highlighter
derive - Hinter
derive - Validator
derive