mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 18:15:04 +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:
@ -51,12 +51,12 @@ impl Command for DecodeBase64 {
|
||||
vec![
|
||||
Example {
|
||||
description: "Base64 decode a value and output as UTF-8 string",
|
||||
example: "echo 'U29tZSBEYXRh' | decode base64",
|
||||
example: "'U29tZSBEYXRh' | decode base64",
|
||||
result: Some(Value::string("Some Data", Span::test_data())),
|
||||
},
|
||||
Example {
|
||||
description: "Base64 decode a value and output as binary",
|
||||
example: "echo 'U29tZSBEYXRh' | decode base64 --binary",
|
||||
example: "'U29tZSBEYXRh' | decode base64 --binary",
|
||||
result: Some(Value::binary(
|
||||
[0x53, 0x6f, 0x6d, 0x65, 0x20, 0x44, 0x61, 0x74, 0x61],
|
||||
Span::test_data(),
|
||||
|
@ -40,12 +40,12 @@ impl Command for EncodeBase64 {
|
||||
vec![
|
||||
Example {
|
||||
description: "Base64 encode a string with default settings",
|
||||
example: "echo 'Some Data' | encode base64",
|
||||
example: "'Some Data' | encode base64",
|
||||
result: Some(Value::string("U29tZSBEYXRh", Span::test_data())),
|
||||
},
|
||||
Example {
|
||||
description: "Base64 encode a string with the binhex character set",
|
||||
example: "echo 'Some Data' | encode base64 --character-set binhex",
|
||||
example: "'Some Data' | encode base64 --character-set binhex",
|
||||
result: Some(Value::string(r#"7epXB5"%A@4J"#, Span::test_data())),
|
||||
},
|
||||
]
|
||||
|
Reference in New Issue
Block a user