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