forked from extern/nushell
Add long options for formats (#10645)
This commit is contained in:
@ -44,7 +44,7 @@ impl Command for ToCsv {
|
||||
},
|
||||
Example {
|
||||
description: "Outputs an CSV string representing the contents of this table",
|
||||
example: "[[foo bar]; [1 2]] | to csv -s ';' ",
|
||||
example: "[[foo bar]; [1 2]] | to csv --separator ';' ",
|
||||
result: Some(Value::test_string("foo;bar\n1;2\n")),
|
||||
},
|
||||
Example {
|
||||
|
@ -91,7 +91,7 @@ impl Command for ToJson {
|
||||
Example {
|
||||
description:
|
||||
"Outputs a JSON string, with 4-space indentation, representing the contents of this table",
|
||||
example: "[Joe Bob Sam] | to json -i 4",
|
||||
example: "[Joe Bob Sam] | to json --indent 4",
|
||||
result: Some(Value::test_string("[\n \"Joe\",\n \"Bob\",\n \"Sam\"\n]")),
|
||||
},
|
||||
Example {
|
||||
|
@ -60,7 +60,7 @@ Additionally any field which is: empty record, empty list or null, can be omitte
|
||||
},
|
||||
Example {
|
||||
description: "Optionally, formats the text with a custom indentation setting",
|
||||
example: r#"{tag: note content : [{tag: remember content : [Event]}]} | to xml -p 3"#,
|
||||
example: r#"{tag: note content : [{tag: remember content : [Event]}]} | to xml --pretty 3"#,
|
||||
result: Some(Value::test_string(
|
||||
"<note>\n <remember>Event</remember>\n</note>",
|
||||
)),
|
||||
|
Reference in New Issue
Block a user