Is this even possible?I'd like to run a command but capture its stdout and stderr as separate variables. Currently I'm using set -l var (cmd), which leaves stderr untouched. I can do set -l var (cmd ^&1) which will merge stdout and stderr into var, but then I can't easily separate them again.Is there any way to get var and var_err to hold stdout and stderr from cmd?
Capture stdout and stderr as separate variables in fish shell
command substitution;stderr;fish
The simplest method would  be to redirect one of the streams to a file:set tmpf (mktemp)trap rm $tmpf EXITset var (cmd ^ $tmpf)set var_err (cat $tmpf)