From 707a4ebc15c9fc67e068f042616cb3e46924ebb9 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Sat, 28 Aug 2021 14:58:59 -0500 Subject: [PATCH] added more escapes to support ansi art (#3973) * added more escapes to support ansi art * fixed some bugs --- .../nu-command/src/commands/strings/char_.rs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/crates/nu-command/src/commands/strings/char_.rs b/crates/nu-command/src/commands/strings/char_.rs index 961fe9746..681508ec6 100644 --- a/crates/nu-command/src/commands/strings/char_.rs +++ b/crates/nu-command/src/commands/strings/char_.rs @@ -68,6 +68,35 @@ lazy_static! { "pound_sign" => '#'.to_string(), // # "sharp" => '#'.to_string(), // # "root" => '#'.to_string(), // # + "comma" => ','.to_string(), // , comma + "semicolon" => ';'.to_string(), // ; semicolon + "dollar" => '$'.to_string(), // $ dollar + "at" => '@'.to_string(), // @ at + "minus" => '-'.to_string(), // - minus + "subtract" => '-'.to_string(), + "dash" => '-'.to_string(), + "plus" => '+'.to_string(), // + plus + "add" => '+'.to_string(), + "divide" => '/'.to_string(), // / divide, slash + "slash" => '/'.to_string(), + "backslash" => '\\'.to_string(),// \ backslash + "percent" => '%'.to_string(), // % percent + "multiply" => '*'.to_string(), // * multiply + "greater_than" => '>'.to_string(), // > greater_than + "gt" => '>'.to_string(), + "less_than" => '<'.to_string(), // < less_than + "lt" => '<'.to_string(), + "and" => '&'.to_string(), // & and, ampersand + "ampersand" => '&'.to_string(), + "equal" => '='.to_string(), // = equal + "eq" => '='.to_string(), + "double_equal" => "==".to_string(), // == double_equal + "fat_arrow" => "=>".to_string(), // => fat_arrow + "right_arrow" => "->".to_string(), // -> right_arrow + "left_arrow" => "<-".to_string(), // <- left_arrow + "question" => '?'.to_string(), // ? question, q + "q" => '?'.to_string(), + "colon" => ':'.to_string(), // : colon // This is the unicode section // Unicode names came from https://www.compart.com/en/unicode