ormaaj 1721180512 learn # enable print; typeset -i p=BASHPID; b=$(type -P basename); { "$b" -a -- "/proc/${p}/fd/"+([[:digit:]]) | sort -un; echo -1; } | nl -s , -w 1 -v 0 | while IFS=, read -r x y && (( x == y )); do ! !; done; eval print -ru '"$x"' B\\\) "${x}>&1" ormaaj 1721183549 forget ormaaj 1721183567 learn # shopt -s lastpipe; set +m; enable print; typeset -i p=BASHPID; b=$(type -P basename); { "$b" -a -- "/proc/${p}/fd/"+([[:digit:]]) | sort -un; echo -1; } | nl -s , -w 1 -v 0 | sed -Ee '/([[:digit:]]+),\1/d;q' | IFS= read -rd , x; set -x; eval print -ru '"$x"' -- B\\\) "${x}>&1"