From 333335c366f1a131ebae99b14e2ad238d406b5fd Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Wed, 30 Jun 2021 12:01:23 -0500 Subject: [PATCH] add ansi osc string terminator (#3712) --- crates/nu-command/src/commands/platform/ansi/command.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/nu-command/src/commands/platform/ansi/command.rs b/crates/nu-command/src/commands/platform/ansi/command.rs index a5255e593..3c1e2ceef 100644 --- a/crates/nu-command/src/commands/platform/ansi/command.rs +++ b/crates/nu-command/src/commands/platform/ansi/command.rs @@ -328,6 +328,8 @@ pub fn str_to_ansi(s: &str) -> Option { "csi" | "escape" | "escape_left" => Some("\x1b[".to_string()), // OSC escape (Operating system command) "osc" | "escape_right" => Some("\x1b]".to_string()), + // OSC string terminator + "string_terminator" | "st" | "str_term" => Some("\x1b\\".to_string()), // Ansi Rgb - Needs to be 32;2;r;g;b or 48;2;r;g;b // assuming the rgb will be passed via command and no here