mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 11:05:40 +02:00
Add long options for generators and math (#10752)
This commit is contained in:
@ -67,17 +67,17 @@ impl Command for SeqDate {
|
||||
},
|
||||
Example {
|
||||
description: "print the previous 10 days in YYYY-MM-DD format with newline separator",
|
||||
example: "seq date --days 10 -r",
|
||||
example: "seq date --days 10 --reverse",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "print the previous 10 days starting today in MM/DD/YYYY format with newline separator",
|
||||
example: "seq date --days 10 -o '%m/%d/%Y' -r",
|
||||
example: "seq date --days 10 -o '%m/%d/%Y' --reverse",
|
||||
result: None,
|
||||
},
|
||||
Example {
|
||||
description: "print the first 10 days in January, 2020",
|
||||
example: "seq date -b '2020-01-01' -e '2020-01-10'",
|
||||
example: "seq date --begin-date '2020-01-01' --end-date '2020-01-10'",
|
||||
result: Some(Value::list(
|
||||
vec![
|
||||
Value::test_string("2020-01-01"),
|
||||
@ -96,7 +96,7 @@ impl Command for SeqDate {
|
||||
},
|
||||
Example {
|
||||
description: "print every fifth day between January 1st 2020 and January 31st 2020",
|
||||
example: "seq date -b '2020-01-01' -e '2020-01-31' -n 5",
|
||||
example: "seq date --begin-date '2020-01-01' --end-date '2020-01-31' --increment 5",
|
||||
result: Some(Value::list(
|
||||
vec![
|
||||
Value::test_string("2020-01-01"),
|
||||
|
@ -71,7 +71,7 @@ impl Command for SubCommand {
|
||||
},
|
||||
Example {
|
||||
description: "Apply the round function with precision specified",
|
||||
example: "[1.555 2.333 -3.111] | math round -p 2",
|
||||
example: "[1.555 2.333 -3.111] | math round --precision 2",
|
||||
result: Some(Value::list(
|
||||
vec![
|
||||
Value::test_float(1.56),
|
||||
@ -83,7 +83,7 @@ impl Command for SubCommand {
|
||||
},
|
||||
Example {
|
||||
description: "Apply negative precision to a list of numbers",
|
||||
example: "[123, 123.3, -123.4] | math round -p -1",
|
||||
example: "[123, 123.3, -123.4] | math round --precision -1",
|
||||
result: Some(Value::list(
|
||||
vec![
|
||||
Value::test_int(120),
|
||||
|
@ -58,7 +58,7 @@ impl Command for SubCommand {
|
||||
},
|
||||
Example {
|
||||
description: "Compute the sample standard deviation of a list of numbers",
|
||||
example: "[1 2 3 4 5] | math stddev -s",
|
||||
example: "[1 2 3 4 5] | math stddev --sample",
|
||||
result: Some(Value::test_float(1.5811388300841898)),
|
||||
},
|
||||
]
|
||||
|
@ -50,7 +50,7 @@ impl Command for SubCommand {
|
||||
},
|
||||
Example {
|
||||
description: "Get the sample variance of a list of numbers",
|
||||
example: "[1 2 3 4 5] | math variance -s",
|
||||
example: "[1 2 3 4 5] | math variance --sample",
|
||||
result: Some(Value::test_float(2.5)),
|
||||
},
|
||||
]
|
||||
|
Reference in New Issue
Block a user