Crate rustyline
Readline for Rust
This implementation is based on Antirez's Linenoise
Example
Usage
let mut rl = new?;
let readline = rl.readline;
match readline
# Ok::
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
Enums
- Anchor Where to paste (relative to cursor position)
- At Where to move with respect to word boundary
- Behavior Should the editor use stdio
- CharSearch character search
- Cmd Commands
- ColorMode Colorization mode
- CompletionType Tab completion style
- EditMode Style of editing / Standard keymaps
- Event Input event
- EventHandler Event handler
- GraphemeClusterMode Tell how grapheme clusters are supported / rendered.
- HistoryDuplicates History filter
- InputMode Vi input modes
- KeyCode Input key pressed
- Movement Where to move
- Word Different word definitions
Traits
-
ConditionalEventHandler
May behave differently depending on:
- edit mode (emacs vs vi)
- vi input mode (insert vs replace vs command modes)
- empty line
- cursor position
- repeat count
- original key pressed (when same command is bound to different key)
- hint
- ...
- ExternalPrinter External printer
- Helper Syntax specific helper.
Type Aliases
-
DefaultEditor
Default editor with no helper and
DefaultHistory - RepeatCount The number of times one command should be repeated.
- Result The error type for I/O and Linux Syscalls (Errno)