mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 17:38:36 +02:00
Remove unnecessary echo
uses from examples (#7500)
`echo` tends to confuse new Nu users; they expect it to work like `print` when it just passes a value to the next stage of the pipeline. We haven't quite figured out what to do about `echo` in the long run, but I think a good start is to remove `echo` from command examples where it would be unnecessary and arguably unidiomatic.
This commit is contained in:
@ -50,7 +50,7 @@ impl Command for Histogram {
|
||||
},
|
||||
Example {
|
||||
description: "Compute a histogram for a list of numbers",
|
||||
example: "echo [1 2 1] | histogram",
|
||||
example: "[1 2 1] | histogram",
|
||||
result: Some(Value::List {
|
||||
vals: vec![Value::Record {
|
||||
cols: vec!["value".to_string(), "count".to_string(), "quantile".to_string(), "percentage".to_string(), "frequency".to_string()],
|
||||
@ -80,7 +80,7 @@ impl Command for Histogram {
|
||||
},
|
||||
Example {
|
||||
description: "Compute a histogram for a list of numbers, and percentage is based on the maximum value",
|
||||
example: "echo [1 2 3 1 1 1 2 2 1 1] | histogram --percentage-type relative",
|
||||
example: "[1 2 3 1 1 1 2 2 1 1] | histogram --percentage-type relative",
|
||||
result: None,
|
||||
}
|
||||
]
|
||||
|
Reference in New Issue
Block a user