mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 08:23:24 +01:00
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:
parent
1dc7e00d20
commit
864139d67f
@ -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
|
||||
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user