Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Bug: reading from tty inside process substitution



The below code hangs after reading the line from the terminal:

    read foo < <(read bar </dev/tty; echo $bar)

The actual use case I ran into this involved a select, which also hangs after item selection:

    read foo < <(select item in a b c; do break; done </dev/tty >/dev/tty 2>&1; echo $item)

Both commands work as intended in both bash and ksh. 

If I replace the outer `read` with a command substitution, it works in zsh as well (it started out as `read` because I was getting multiple values out of the `select`ed line).

I'm running zsh 5.9, tested on macOS 13.6 and 14.0 and Ubuntu 22.04.3
--
Mark J. Reed <markjreed@xxxxxxxxx>


Messages sorted by: Reverse Date, Date, Thread, Author