Manual: confusing example in Process Expansions chapter
In the Process Expansions chapter the following code is given:
let array = @(cmd args...)
I expected this to produce an array that I could access using @array
. It instead produces a string $array
. I eventually figured out that I need to use let array = [ @(cmd args...) ]
to perform a deep copy.
The example should be changed to let array = [ @(cmd args...) ]
and include a link to https://doc.redox-os.org/ion-manual/html/variables/02-arrays.html#copy-array-into-a-new-array as a reminder of the reason for the square brackets.