forked from extern/nushell
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:
@ -60,7 +60,7 @@ impl Command for SubCommand {
|
||||
vec![
|
||||
Example {
|
||||
description: "Split a string into columns by the specified separator",
|
||||
example: "echo 'a--b--c' | split column '--'",
|
||||
example: "'a--b--c' | split column '--'",
|
||||
result: Some(Value::List {
|
||||
vals: vec![Value::Record {
|
||||
cols: vec![
|
||||
|
@ -54,7 +54,7 @@ impl Command for SubCommand {
|
||||
vec![
|
||||
Example {
|
||||
description: "Split a string into rows of char",
|
||||
example: "echo 'abc' | split row ''",
|
||||
example: "'abc' | split row ''",
|
||||
result: Some(Value::List {
|
||||
vals: vec![
|
||||
Value::test_string(""),
|
||||
@ -68,7 +68,7 @@ impl Command for SubCommand {
|
||||
},
|
||||
Example {
|
||||
description: "Split a string into rows by the specified separator",
|
||||
example: "echo 'a--b--c' | split row '--'",
|
||||
example: "'a--b--c' | split row '--'",
|
||||
result: Some(Value::List {
|
||||
vals: vec![
|
||||
Value::test_string("a"),
|
||||
@ -80,7 +80,7 @@ impl Command for SubCommand {
|
||||
},
|
||||
Example {
|
||||
description: "Split a string by '-'",
|
||||
example: "echo '-a-b-c-' | split row '-'",
|
||||
example: "'-a-b-c-' | split row '-'",
|
||||
result: Some(Value::List {
|
||||
vals: vec![
|
||||
Value::test_string(""),
|
||||
|
Reference in New Issue
Block a user