mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Test command names and search terms for redundancy (#6380)
* Test commands for proper names and search terms Assert that the `Command.name()` is equal to `Signature.name` Check that search terms are not just substrings of the command name as they would not help finding the command. * Clean up search terms Remove redundant terms that just replicate the command name. Try to eliminate substring between search terms, clean up where necessary.
This commit is contained in:
committed by
GitHub
parent
ef26d539a7
commit
0afe1e4e67
@ -35,7 +35,7 @@ impl Command for FileSize {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "display", "pattern", "file", "size"]
|
||||
vec!["convert", "display", "pattern", "human readable"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -34,7 +34,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["column", "separate", "divide"]
|
||||
vec!["separate", "divide"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -28,7 +28,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["list", "separate", "divide"]
|
||||
vec!["separate", "divide"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -34,7 +34,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["row", "separate", "divide"]
|
||||
vec!["separate", "divide"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -45,7 +45,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["word", "separate", "divide"]
|
||||
vec!["separate", "divide"]
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
|
@ -29,7 +29,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "snake", "underscore", "convention"]
|
||||
vec!["convert", "style", "underscore", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -29,14 +29,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"convert",
|
||||
"style",
|
||||
"snake",
|
||||
"underscore",
|
||||
"lower",
|
||||
"convention",
|
||||
]
|
||||
vec!["convert", "style", "underscore", "lower", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -30,7 +30,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "title", "convention"]
|
||||
vec!["convert", "style", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -52,7 +52,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["pattern", "match", "find", "search", "index"]
|
||||
vec!["pattern", "match", "find", "search"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -28,7 +28,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["len", "size", "count"]
|
||||
vec!["size", "count"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
Reference in New Issue
Block a user