Simplify string interpolation (#3401)

* [DRAFT] simplify string interpolation

* Fix test
This commit is contained in:
JT
2021-05-12 13:53:57 +12:00
committed by GitHub
parent 25a8caa9b0
commit 311c0e3f50
6 changed files with 62 additions and 117 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")]),
},
]