From 6c56829976194f1a1e88ab8e4bf712015e1a01e7 Mon Sep 17 00:00:00 2001 From: pwygab <88221256+merelymyself@users.noreply.github.com> Date: Thu, 19 May 2022 00:26:58 +0800 Subject: [PATCH] Allowing for flags with '=' in them to register as flags. (#5579) * hacky fix for registering flags with '=' * fmt --- crates/nu-parser/src/deparse.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/nu-parser/src/deparse.rs b/crates/nu-parser/src/deparse.rs index 1b4ffbd8ed..d3b4844a75 100644 --- a/crates/nu-parser/src/deparse.rs +++ b/crates/nu-parser/src/deparse.rs @@ -94,7 +94,10 @@ pub fn escape_quote_string_with_file(input: &str, file: &str) -> String { } } } - if word.contains(input) { + if word.contains(input) || { + let s: Vec<&str> = input.split('=').collect(); + word.contains(s[0]) + } { return input.to_string(); } }