Trait atuin_common::utils::Escapable

source ·
pub trait Escapable: AsRef<str> {
    // Provided method
    fn escape_control(&self) -> Cow<'_, str> { ... }
}
Expand description

Extension trait for anything that can behave like a string to make it easy to escape control characters.

Intended to help prevent control characters being printed and interpreted by the terminal when printing history as well as to ensure the commands that appear in the interactive search reflect the actual command run rather than just the printable characters.

Provided Methods§

source

fn escape_control(&self) -> Cow<'_, str>

Implementors§

source§

impl<T: AsRef<str>> Escapable for T