mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Fix command descriptions+examples (#5129)
* Fix exit usage * Move dfr as-date* format examples to extra_usage * Update command usage and examples * More docs on `str trim` Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
This commit is contained in:
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"gets the host of a url"
|
||||
"Get the host of a URL"
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"gets the path of a url"
|
||||
"Get the path of a URL"
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"gets the query of a url"
|
||||
"Get the query string of a URL"
|
||||
}
|
||||
|
||||
fn run(
|
||||
@ -39,7 +39,7 @@ impl Command for SubCommand {
|
||||
let span = Span::test_data();
|
||||
vec![
|
||||
Example {
|
||||
description: "Get query of a url",
|
||||
description: "Get a query string",
|
||||
example: "echo 'http://www.example.com/?foo=bar&baz=quux' | url query",
|
||||
result: Some(Value::String {
|
||||
val: "foo=bar&baz=quux".to_string(),
|
||||
@ -47,7 +47,7 @@ impl Command for SubCommand {
|
||||
}),
|
||||
},
|
||||
Example {
|
||||
description: "No query gives the empty string",
|
||||
description: "Returns an empty string if there is no query string",
|
||||
example: "echo 'http://www.example.com/' | url query",
|
||||
result: Some(Value::String {
|
||||
val: "".to_string(),
|
||||
|
@ -22,7 +22,7 @@ impl Command for SubCommand {
|
||||
}
|
||||
|
||||
fn usage(&self) -> &str {
|
||||
"gets the scheme (eg http, file) of a url"
|
||||
"Get the scheme (e.g. http, file) of a URL"
|
||||
}
|
||||
|
||||
fn run(
|
||||
@ -39,7 +39,7 @@ impl Command for SubCommand {
|
||||
let span = Span::test_data();
|
||||
vec![
|
||||
Example {
|
||||
description: "Get scheme of a url",
|
||||
description: "Get the scheme of a URL",
|
||||
example: "echo 'http://www.example.com' | url scheme",
|
||||
result: Some(Value::String {
|
||||
val: "http".to_string(),
|
||||
|
Reference in New Issue
Block a user