Paren interpolation (#3452)

* Switch interp to use parens

* improve interp parsing
This commit is contained in:
JT
2021-05-21 10:55:38 +12:00
committed by GitHub
parent 722f191e82
commit 4fdbf30308
4 changed files with 43 additions and 13 deletions

View File

@ -52,7 +52,7 @@ impl WholeStreamCommand for Each {
Example {
description: "Number each item and echo a message",
example:
"echo ['bob' 'fred'] | each --numbered { echo $\"{$it.index} is {$it.item}\" }",
"echo ['bob' 'fred'] | each --numbered { echo $\"($it.index) is ($it.item)\" }",
result: Some(vec![Value::from("0 is bob"), Value::from("1 is fred")]),
},
Example {