diff --git a/crates/nu-command/src/platform/ansi/ansi_.rs b/crates/nu-command/src/platform/ansi/ansi_.rs index f20e62027e..a4288ddfcc 100644 --- a/crates/nu-command/src/platform/ansi/ansi_.rs +++ b/crates/nu-command/src/platform/ansi/ansi_.rs @@ -381,8 +381,10 @@ Format: # format!("\x1b[{}", code_string) } else if osc && param_is_valid_string { // Operating system command aka osc ESC ] <- note the right brace, not left brace for osc - // OCS's need to end with a bell '\x07' char - format!("\x1b]{};", code_string) + // OCS's need to end with either: + // bel '\x07' char + // string terminator aka st '\\' char + format!("\x1b]{}", code_string) } else if param_is_valid_string { // parse hex colors like #00FF00 if code_string.starts_with('#') {