pub struct Config { /* private fields */ }
Expand description
User preferences
Implementations§
Source§impl Config
impl Config
Sourcepub fn max_history_size(&self) -> usize
pub fn max_history_size(&self) -> usize
Tell the maximum length (i.e. number of entries) for the history.
Sourcepub fn history_duplicates(&self) -> HistoryDuplicates
pub fn history_duplicates(&self) -> HistoryDuplicates
Tell if lines which match the previous history entry are saved or not in the history list.
By default, they are ignored.
Sourcepub fn history_ignore_space(&self) -> bool
pub fn history_ignore_space(&self) -> bool
Tell if lines which begin with a space character are saved or not in the history list.
By default, they are saved.
Sourcepub fn completion_type(&self) -> CompletionType
pub fn completion_type(&self) -> CompletionType
Completion behaviour.
By default, CompletionType::Circular
.
Sourcepub fn completion_prompt_limit(&self) -> usize
pub fn completion_prompt_limit(&self) -> usize
When listing completion alternatives, only display
one screen of possibilities at a time (used for CompletionType::List
mode).
Sourcepub fn keyseq_timeout(&self) -> Option<u16>
pub fn keyseq_timeout(&self) -> Option<u16>
Duration (milliseconds) Rustyline will wait for a character when
reading an ambiguous key sequence (used for EditMode::Vi
mode on unix
platform).
By default, no timeout (-1) or 500ms if EditMode::Vi
is activated.
Sourcepub fn auto_add_history(&self) -> bool
pub fn auto_add_history(&self) -> bool
Tell if lines are automatically added to the history.
By default, they are not.
Sourcepub fn bell_style(&self) -> BellStyle
pub fn bell_style(&self) -> BellStyle
Bell style: beep, flash or nothing.
Sourcepub fn color_mode(&self) -> ColorMode
pub fn color_mode(&self) -> ColorMode
Tell if colors should be enabled.
By default, they are except if stdout is not a TTY.
Sourcepub fn check_cursor_position(&self) -> bool
pub fn check_cursor_position(&self) -> bool
Check if cursor position is at leftmost before displaying prompt.
By default, we don’t check.
Sourcepub fn indent_size(&self) -> usize
pub fn indent_size(&self) -> usize
Indentation size used by indentation commands
By default, 2.
Sourcepub fn enable_bracketed_paste(&self) -> bool
pub fn enable_bracketed_paste(&self) -> bool
Bracketed paste on unix platform
By default, it’s enabled.
Sourcepub fn enable_signals(&self) -> bool
pub fn enable_signals(&self) -> bool
Enable or disable signals in termios
By default, it’s disabled.