mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 17:05:03 +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
@ -23,7 +23,6 @@ impl Command for Date {
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"date",
|
||||
"time",
|
||||
"now",
|
||||
"today",
|
||||
|
@ -35,7 +35,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "format", "strftime"]
|
||||
vec!["fmt", "strftime"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -22,8 +22,6 @@ impl Command for SubCommand {
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"date",
|
||||
"humanize",
|
||||
"relative",
|
||||
"now",
|
||||
"today",
|
||||
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["UTC", "GMT", "timezone", "list", "list-timezone"]
|
||||
vec!["UTC", "GMT", "tz"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -19,7 +19,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "now", "present", "current-time"]
|
||||
vec!["present", "current-time"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -23,7 +23,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "to", "record", "structured", "table"]
|
||||
vec!["structured", "table"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -23,7 +23,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "to", "record", "structured", "table"]
|
||||
vec!["structured"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -34,9 +34,7 @@ impl Command for SubCommand {
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"date",
|
||||
"to",
|
||||
"timezone",
|
||||
"tz",
|
||||
"transform",
|
||||
"convert",
|
||||
"UTC",
|
||||
|
Reference in New Issue
Block a user