You can use the mapfile
module:
zmodload zsh/mapfile
_values ${(f)mapfile[.test_tasks~]}
The mapfile
associative array provides access to the contents of external files. The parameter expansion flag (f)
splits the resulting expansion on newlines, so that each line of the file will form a separate argument to _values
.