From 9c84c01aef5aeb0378303d314789048d1f903139 Mon Sep 17 00:00:00 2001 From: ja-cop <85242676+ja-cop@users.noreply.github.com> Date: Sun, 11 Jun 2023 00:02:00 +0200 Subject: [PATCH] Add "regex" search term to commands with regex functionality (#9402) Just makes it easier to find these commands when using the `help` system - the `find` command already has the "regex" search term. Co-authored-by: ja_cop --- crates/nu-command/src/strings/parse.rs | 2 +- crates/nu-command/src/strings/split/column.rs | 2 +- crates/nu-command/src/strings/split/list.rs | 2 +- crates/nu-command/src/strings/split/row.rs | 2 +- crates/nu-command/src/strings/str_/replace.rs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/nu-command/src/strings/parse.rs b/crates/nu-command/src/strings/parse.rs index 06d26be44..ebeeee8a7 100644 --- a/crates/nu-command/src/strings/parse.rs +++ b/crates/nu-command/src/strings/parse.rs @@ -20,7 +20,7 @@ impl Command for Parse { } fn search_terms(&self) -> Vec<&str> { - vec!["pattern", "match"] + vec!["pattern", "match", "regex"] } fn signature(&self) -> nu_protocol::Signature { diff --git a/crates/nu-command/src/strings/split/column.rs b/crates/nu-command/src/strings/split/column.rs index 98837474d..7852aa49b 100644 --- a/crates/nu-command/src/strings/split/column.rs +++ b/crates/nu-command/src/strings/split/column.rs @@ -45,7 +45,7 @@ impl Command for SubCommand { } fn search_terms(&self) -> Vec<&str> { - vec!["separate", "divide"] + vec!["separate", "divide", "regex"] } fn run( diff --git a/crates/nu-command/src/strings/split/list.rs b/crates/nu-command/src/strings/split/list.rs index 8db4ef04d..7bfc4fb8a 100644 --- a/crates/nu-command/src/strings/split/list.rs +++ b/crates/nu-command/src/strings/split/list.rs @@ -38,7 +38,7 @@ impl Command for SubCommand { } fn search_terms(&self) -> Vec<&str> { - vec!["separate", "divide"] + vec!["separate", "divide", "regex"] } fn run( diff --git a/crates/nu-command/src/strings/split/row.rs b/crates/nu-command/src/strings/split/row.rs index 3dea82213..74d5d322c 100644 --- a/crates/nu-command/src/strings/split/row.rs +++ b/crates/nu-command/src/strings/split/row.rs @@ -38,7 +38,7 @@ impl Command for SubCommand { } fn search_terms(&self) -> Vec<&str> { - vec!["separate", "divide"] + vec!["separate", "divide", "regex"] } fn run( diff --git a/crates/nu-command/src/strings/str_/replace.rs b/crates/nu-command/src/strings/str_/replace.rs index 91b7b45dd..5c6356368 100644 --- a/crates/nu-command/src/strings/str_/replace.rs +++ b/crates/nu-command/src/strings/str_/replace.rs @@ -61,7 +61,7 @@ impl Command for SubCommand { } fn search_terms(&self) -> Vec<&str> { - vec!["search", "shift", "switch"] + vec!["search", "shift", "switch", "regex"] } fn run(