back
1 comments
I believe Bash readarray/mapfile is more like doing this in Zsh:

  lines=( "${(@f)$(my_command)}" )
or

  lines=( "${(@f)$(<my_file)}" )
which IMO is a little less nice than using a builtin with a name like "readarray".

But this is cool too.