The documentation on the 'each' filter says that:
grasp arr --replace '[{{.elements | each before 1 | join "," }}]'
will transform [1,2,3,4]; into [11,12,13,14];.
But when I run echo '[1,2,3,4];' | grasp arr --replace '[{{.elements | each before 1 | join "," }}]', I get:
(standard input): Error during replacement. No arguments supplied for 'each before 1'.
I traced this back to levn.parse parsing the arguments 'before 1' into args = ['before 1'], rather than what it should be, which is args = ['before', 1].
Running echo '[1,2,3,4];' | grasp arr --replace '[{{.elements | each before, 1 | join "," }}]' (note the comma after 'before') produces the expected output.
The documentation on the 'each' filter says that:
grasp arr --replace '[{{.elements | each before 1 | join "," }}]'
will transform[1,2,3,4];
into[11,12,13,14];
.But when I run
echo '[1,2,3,4];' | grasp arr --replace '[{{.elements | each before 1 | join "," }}]'
, I get:(standard input): Error during replacement. No arguments supplied for 'each before 1'.
I traced this back to
levn.parse
parsing the arguments'before 1'
intoargs = ['before 1']
, rather than what it should be, which isargs = ['before', 1]
.Running
echo '[1,2,3,4];' | grasp arr --replace '[{{.elements | each before, 1 | join "," }}]'
(note the comma after 'before') produces the expected output.