From a65a7df209300ed1ac6eac359d2aed795508b60a Mon Sep 17 00:00:00 2001 From: Stefan Holderbach Date: Tue, 3 Dec 2024 16:59:37 +0100 Subject: [PATCH] Add `remove` as a search term on `drop` commands (#14493) # Description Better discoverability of `drop` subcommands "I want to remove items by index" -> `drop nth` h/t @amtoine # User-Facing Changes More search terms --- crates/nu-command/src/filters/drop/column.rs | 2 +- crates/nu-command/src/filters/drop/drop_.rs | 2 +- crates/nu-command/src/filters/drop/nth.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/src/filters/drop/column.rs b/crates/nu-command/src/filters/drop/column.rs index f39e0e2276..b69a15b2d7 100644 --- a/crates/nu-command/src/filters/drop/column.rs +++ b/crates/nu-command/src/filters/drop/column.rs @@ -29,7 +29,7 @@ impl Command for DropColumn { } fn search_terms(&self) -> Vec<&str> { - vec!["delete"] + vec!["delete", "remove"] } fn run( diff --git a/crates/nu-command/src/filters/drop/drop_.rs b/crates/nu-command/src/filters/drop/drop_.rs index 67abea625d..d35e191a19 100644 --- a/crates/nu-command/src/filters/drop/drop_.rs +++ b/crates/nu-command/src/filters/drop/drop_.rs @@ -26,7 +26,7 @@ impl Command for Drop { } fn search_terms(&self) -> Vec<&str> { - vec!["delete"] + vec!["delete", "remove"] } fn examples(&self) -> Vec { diff --git a/crates/nu-command/src/filters/drop/nth.rs b/crates/nu-command/src/filters/drop/nth.rs index d2aed50332..282aa41c1d 100644 --- a/crates/nu-command/src/filters/drop/nth.rs +++ b/crates/nu-command/src/filters/drop/nth.rs @@ -32,7 +32,7 @@ impl Command for DropNth { } fn search_terms(&self) -> Vec<&str> { - vec!["delete"] + vec!["delete", "remove", "index"] } fn examples(&self) -> Vec {