Skip to main content

Crate line_editor

Crate line_editor 

Source
Expand description

A line editing library providing an idiomatic Rust interface (Editor, History, Config, Color, Hint, autocompletion, and multiline mode) derived from linenoise.

Structs§

Config
Configuration settings for an Editor instance.
Editor
Interactive line editor instance.
Hint
Represents an inline hint displayed alongside the input buffer.
History
Manages input history for the line editor.
UnbufferedStdout
An unbuffered writer to standard output using the write(2) system call directly on libc::STDOUT_FILENO.

Enums§

Color
Standard ANSI colors for hint text.
ColumnWidth
Controls how the terminal window column width is determined.
OperatingMode
Represents the resolved concrete operating mode of the line editor.
ReadlineError
Errors that can occur during line reading.
TerminalCapability
Represents the capability level of a terminal type name (e.g., TERM variable or explicit configuration).
TerminalMode
Controls how TTY terminal capability detection is performed.

Constants§

DEFAULT_COLUMN_COUNT
Default terminal column width when auto-detection fails.
DEFAULT_MAX_HISTORY_LEN
Default maximum number of history entries retained in memory.
DEFAULT_MAX_LINE_LEN
Default maximum length of an input line in bytes.

Traits§

CompletionHandler
Closure type for tab completion handlers.
HintHandler
Closure type for inline hint handlers.

Functions§

readline
Reads a line from stdin using default configuration.
terminal_capability_from_name
Classifies a terminal type name into a TerminalCapability.