move bel and backspace to char since they're not ansi (#3144)

* move bel and backspace to char since they're not ansi

* Trigger Build
This commit is contained in:
Darren Schroeder 2021-03-09 03:34:51 -06:00 committed by GitHub
parent 1dc7e00d20
commit 864139d67f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -298,8 +298,6 @@ pub fn str_to_ansi(s: String) -> Option<String> {
// For setting title like `echo [$(char title) $(pwd) $(char bel)] | str collect`
"title" => Some("\x1b]2;".to_string()), // ESC]2; xterm sets window title using OSC syntax escapes
"bel" => Some('\x07'.to_string()), // Terminal Bell
"backspace" => Some('\x08'.to_string()), // Backspace
// Ansi Erase Sequences
"clear_screen" => Some("\x1b[J".to_string()), // clears the screen

View file

@ -130,6 +130,9 @@ fn str_to_character(s: &str) -> Option<String> {
"snowy" | "snow" => Some("❄️".to_string()),
"thunderstorm" | "thunder" => Some("🌩️".to_string()),
"bel" => Some('\x07'.to_string()), // Terminal Bell
"backspace" => Some('\x08'.to_string()), // Backspace
_ => None,
}
}