On 11/14/2015 09:20 AM, Ray Andrews wrote:
And it's even simpler in case the output is to be captured and not echoed to stdout at all:{ highlight ... >/dev/tty } 2>&1 | read highlight_err # now $highlight_err has the first line of stderr # (this does not work in most shells other than zsh)
body_list=( ${(@f)"$( highlight $filename )"} ) 2>&1 | read _err If I do:body_list=( ${(@f)"$( highlight $filename > /dev/tty )"} ) 2>&1 | read _err
... I get the output to screen, so that answers my previous question. The syntactic logic might be harder than Finnish, but it *is* there.