Awesome! Could you please cc the fix to this thread once it's done? Thank you!
Hengyang On Wed, May 22, 2019, 7:27 AM Chet Ramey <chet.ra...@case.edu> wrote: > On 5/21/19 12:51 AM, Hengyang Zhao wrote: > > Dear bash developers, > > > > I found an unexpected behavior when engineering some code in a callback > of > > DEBUG trap. The code has been distilled to expose this behavior: > > > > ### BEGIN > > my_func() { > > local x=$(:) > > } > > trap my_func DEBUG > > false | true | false | true | false > > echo ${PIPESTATUS[@]} > > # expects 1 0 1 0 1 > > # gets 0 0 0 0 1 > > ### END > > Thanks for the report. This appears to be a Linux-only problem (at least I > can't reproduce it on Mac OS X). I'll fix it for the next devel push. > > 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/ >