Skip to content

Commit

Permalink
Add remove as a search term on drop commands (nushell#14493)
Browse files Browse the repository at this point in the history
# Description
Better discoverability of `drop` subcommands
"I want to remove items by index" -> `drop nth`
h/t @amtoine

# User-Facing Changes
More search terms
  • Loading branch information
sholderbach authored Dec 3, 2024
1 parent c63bb81 commit a65a7df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/nu-command/src/filters/drop/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Command for DropColumn {
}

fn search_terms(&self) -> Vec<&str> {
vec!["delete"]
vec!["delete", "remove"]
}

fn run(
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/filters/drop/drop_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Command for Drop {
}

fn search_terms(&self) -> Vec<&str> {
vec!["delete"]
vec!["delete", "remove"]
}

fn examples(&self) -> Vec<Example> {
Expand Down
2 changes: 1 addition & 1 deletion crates/nu-command/src/filters/drop/nth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Command for DropNth {
}

fn search_terms(&self) -> Vec<&str> {
vec!["delete"]
vec!["delete", "remove", "index"]
}

fn examples(&self) -> Vec<Example> {
Expand Down

0 comments on commit a65a7df

Please sign in to comment.