mirror of
https://github.com/nushell/nushell.git
synced 2025-01-03 04:50:28 +01:00
fill example's description, add second example
This commit is contained in:
parent
9342c91c55
commit
e259d37027
@ -28,16 +28,27 @@ impl Command for BytesSplit {
|
||||
}
|
||||
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
vec![
|
||||
Example {
|
||||
example: r#"0x[66 6F 6F 20 62 61 72 20 62 61 7A 20] | bytes split 0x[20]"#,
|
||||
description: "",
|
||||
description: "Split a binary value using a binary separator",
|
||||
result: Some(Value::test_list(vec![
|
||||
Value::test_binary("foo"),
|
||||
Value::test_binary("bar"),
|
||||
Value::test_binary("baz"),
|
||||
Value::test_binary(""),
|
||||
])),
|
||||
}]
|
||||
},
|
||||
Example {
|
||||
example: r#"0x[61 2D 2D 62 2D 2D 63] | bytes split "--""#,
|
||||
description: "Split a binary value using a string separator",
|
||||
result: Some(Value::test_list(vec![
|
||||
Value::test_binary("a"),
|
||||
Value::test_binary("b"),
|
||||
Value::test_binary("c"),
|
||||
])),
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
fn run(
|
||||
|
Loading…
Reference in New Issue
Block a user