mirror of
https://github.com/nushell/nushell.git
synced 2025-08-17 13:51:09 +02:00
feat: add search terms to category of strings (#5723)
This commit is contained in:
@ -29,6 +29,10 @@ impl Command for SubCommand {
|
||||
"Convert a string to camelCase"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "caps", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -27,6 +27,10 @@ impl Command for SubCommand {
|
||||
"Capitalize first letter of text"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "caps", "upper"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -29,6 +29,10 @@ impl Command for SubCommand {
|
||||
"Convert a string to kebab-case"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "hyphens", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -29,6 +29,10 @@ impl Command for SubCommand {
|
||||
"Convert a string to PascalCase"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "caps", "upper", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -28,6 +28,10 @@ impl Command for SubCommand {
|
||||
"Convert a string to SCREAMING_SNAKE_CASE"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "snake", "underscore", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -23,10 +23,22 @@ impl Command for SubCommand {
|
||||
)
|
||||
.category(Category::Strings)
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"Convert a string to snake_case"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"convert",
|
||||
"style",
|
||||
"snake",
|
||||
"underscore",
|
||||
"lower",
|
||||
"convention",
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -29,6 +29,10 @@ impl Command for SubCommand {
|
||||
"Convert a string to Title Case"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["convert", "style", "title", "convention"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
Reference in New Issue
Block a user