#!/usr/bin/env zsh setopt ERR_EXIT zmodload zsh/zpty zpty zshfe zsh zpty -w zshfe "print ZSHFE $*"$'\t EFHSZ\nexit\n' zpty -r zshfe zshfe "*exit" print -- $zshfe | sed -n "s/^ZSHFE \(.*\) EFHSZ/\1/p"