mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 18:57:44 +02:00
feat: add search terms to date (#5306)
* add search terms * add search terms * add search terms * add search terms * add search terms * add search terms * add search terms * add search terms * add search patterns * run cargo fmt --all
This commit is contained in:
committed by
GitHub
parent
b9eb213f36
commit
667eb27d1b
@ -21,6 +21,20 @@ impl Command for Date {
|
||||
"Date-related commands"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"date",
|
||||
"time",
|
||||
"now",
|
||||
"today",
|
||||
"tomorrow",
|
||||
"yesterday",
|
||||
"weekday",
|
||||
"weekday_name",
|
||||
"timezone",
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -31,6 +31,10 @@ impl Command for SubCommand {
|
||||
"Format a given date using a format string."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "format", "strftime"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -20,6 +20,21 @@ impl Command for SubCommand {
|
||||
"Print a 'humanized' format for the date, relative to now."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"date",
|
||||
"humanize",
|
||||
"relative",
|
||||
"now",
|
||||
"today",
|
||||
"tomorrow",
|
||||
"yesterday",
|
||||
"weekday",
|
||||
"weekday_name",
|
||||
"timezone",
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -21,6 +21,10 @@ impl Command for SubCommand {
|
||||
"List supported time zones."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["UTC", "GMT", "timezone", "list", "list-timezone"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -18,6 +18,10 @@ impl Command for SubCommand {
|
||||
"Get the current date."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "now", "present", "current-time"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
_engine_state: &EngineState,
|
||||
|
@ -22,6 +22,10 @@ impl Command for SubCommand {
|
||||
"Convert the date into a structured table."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "to", "record", "structured", "table"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -22,6 +22,10 @@ impl Command for SubCommand {
|
||||
"Convert the date into a structured table."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["date", "to", "record", "structured", "table"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
@ -32,6 +32,20 @@ impl Command for SubCommand {
|
||||
"Use 'date list-timezone' to list all supported time zones."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec![
|
||||
"date",
|
||||
"to",
|
||||
"timezone",
|
||||
"transform",
|
||||
"convert",
|
||||
"UTC",
|
||||
"GMT",
|
||||
"list",
|
||||
"list-timezone",
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
Reference in New Issue
Block a user