feat: add search terms to category of strings (#5723)

This commit is contained in:
Jae-Heon Ji
2022-06-06 22:47:09 +09:00
committed by GitHub
parent b8d253cbd7
commit 820a6bfb08
26 changed files with 112 additions and 0 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,