mirror of
https://github.com/nushell/nushell
synced 2025-01-13 21:55:07 +00:00
feat: add search terms to network (#5602)
Co-authored-by: Leyoh Li <leyohli@LeyohdeMacBook-Air.local>
This commit is contained in:
parent
7c63ce15d8
commit
e9d8b19d4d
7 changed files with 28 additions and 0 deletions
|
@ -75,6 +75,10 @@ impl Command for SubCommand {
|
|||
"Performs HTTP GET operation."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["network", "fetch", "get", "pull", "request", "http"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -79,6 +79,10 @@ impl Command for SubCommand {
|
|||
"Performs HTTP POST operation."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["network", "post", "send", "push", "http"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -25,6 +25,10 @@ impl Command for SubCommand {
|
|||
"Get the host of a URL"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["url", "host", "hostname"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -25,6 +25,10 @@ impl Command for SubCommand {
|
|||
"Get the path of a URL"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["url", "path"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -25,6 +25,10 @@ impl Command for SubCommand {
|
|||
"Get the query string of a URL"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["url", "query", "parameter"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -25,6 +25,10 @@ impl Command for SubCommand {
|
|||
"Get the scheme (e.g. http, file) of a URL"
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["url", "scheme", "protocol"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
|
@ -21,6 +21,10 @@ impl Command for Url {
|
|||
"Apply url function."
|
||||
}
|
||||
|
||||
fn search_terms(&self) -> Vec<&str> {
|
||||
vec!["url", "network", "parse"]
|
||||
}
|
||||
|
||||
fn run(
|
||||
&self,
|
||||
engine_state: &EngineState,
|
||||
|
|
Loading…
Reference in a new issue