mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
7.14k stars 338 forks source link

interp: add initial mapfile or readarray builtin #863

Closed lollipopman closed 2 years ago

lollipopman commented 2 years ago

Add an initial implementation of mapfile or readarray, this version only supports the basic options of -d, -t, and a custom array variable name. At present it only support splitting on ASCII delimiters.

lollipopman commented 2 years ago

Thanks for the careful review @mvdan, I believe this is now ready to merge.