Oh, and how about doing something like 'exec 3<&x' to redirect xtrace to fd#3?
Doesn’t mix well with 'mksh -x foo' though.
Also, 'exec x>&3' can't be extended that way, or 'exec file<&x'… but one could do 'exec 3>foo; exec 3<&x'.
Also, need to think about whether this should dup or not.
Oh, and how about doing something like 'exec 3<&x' to redirect xtrace to fd#3?
Doesn’t mix well with 'mksh -x foo' though.
Also, 'exec x>&3' can't be extended that way, or 'exec file<&x'…
but one could do 'exec 3>foo; exec 3<&x'.
Also, need to think about whether this should dup or not.