diff --git a/crates/nu-command/src/commands/ansi/command.rs b/crates/nu-command/src/commands/ansi/command.rs index dff6db4d52..aaa1720354 100644 --- a/crates/nu-command/src/commands/ansi/command.rs +++ b/crates/nu-command/src/commands/ansi/command.rs @@ -298,8 +298,6 @@ pub fn str_to_ansi(s: String) -> Option { // 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 diff --git a/crates/nu-command/src/commands/char_.rs b/crates/nu-command/src/commands/char_.rs index 33ff0b3a47..b93236291b 100644 --- a/crates/nu-command/src/commands/char_.rs +++ b/crates/nu-command/src/commands/char_.rs @@ -130,6 +130,9 @@ fn str_to_character(s: &str) -> Option { "snowy" | "snow" => Some("❄ī¸".to_string()), "thunderstorm" | "thunder" => Some("🌩ī¸".to_string()), + "bel" => Some('\x07'.to_string()), // Terminal Bell + "backspace" => Some('\x08'.to_string()), // Backspace + _ => None, } }