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

Re: PATCH: correct A04redirect.ztst so that it works on VSCode



On Tue, Nov 28, 2023 at 2:18 PM German Riano <griano@xxxxxxxxx> wrote:
>
> VSCode sometimes opens certain file descriptors whan you run a terminal nested in it.

Thanks for the report and suggested fix.  Question for zsh-workers --
could we just do this?

bad_fd_msg="${$( { exec 9>&-; echo >&9 } 2>&1)##*:}"

That is, don't bother assigning myfd=99 in the first place (the test
script never uses this value of myfd again) and in the subshell
explicitly close an arbitrary FD before trying to use it?  The only
restriction seems to be that the descriptor tested must not be 0/1/2
or we won't get the error.  Also the pass through the "msg" temporary
file seems unnecessary too?




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