This just made me sad: tedious_function() { : # lots of stuff } {BASH_XTRACEFD}>/dev/null
it would be so cool to be able to disable debug output BASH_XTRACEFD like that whether or not BASH_XTRACEFD was set. I guess the variable would have to be local to the function invocation too. Please add it to the wishlist for bash 5 ;-) On Thu, 25 Jul 2019 at 15:11, Chet Ramey <chet.ra...@case.edu> wrote: > On 7/25/19 9:03 AM, Sam Liddicott wrote: > > > Perhaps if the named fd is also closed on the same statement that opened > > it, it could be kept closed rather than saved and re-opened. > > Being closed at the same statement is a strong indicator that it was only > > used to aid fd transplants. Why keep open what the author closed? > > That's an interesting suggestion. I considered it at some point, and > there's even a comment in the code about it. I'll look at it again. > > Chet > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ >