mirror of
https://github.com/nushell/nushell
synced 2024-12-26 13:03:07 +00: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
2 changed files with 3 additions and 2 deletions
|
@ -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 a new issue