On Wed, Dec 18, 2024, at 9:39 PM, Zachary Santer wrote:
> $ set -u
> $ unset REPLY
> $ printf '%s\n' "${REPLY}"
> bash: REPLY: unbound variable
> $ printf '%s\n' "${| :; }"
>
> $ printf '%s\n' "${| unset REPLY; }"FWIW, this agrees with mksh R59 2020/10/31 but not zsh master. (I'll be raising the issue on [email protected] shortly, to verify whether the behavior is intentional or incidental.) % cat /tmp/funsubs.sh set -u unset REPLY (printf '<%s>\n' "$REPLY") (printf '<%s>\n' "${| :; }") (printf '<%s>\n' "${| unset REPLY; }") % mksh /tmp/funsubs.sh /tmp/funsubs.sh[3]: REPLY: parameter not set <> <> % ~/src/bash/bash /tmp/funsubs.sh /tmp/funsubs.sh: line 3: REPLY: unbound variable <> <> % ~/src/zsh/zsh/Src/zsh /tmp/funsubs.sh /tmp/funsubs.sh:3: REPLY: parameter not set /tmp/funsubs.sh:4: : parameter not set /tmp/funsubs.sh:5: : parameter not set -- vq
