8 Ekim 2022 Cumartesi tarihinde Cynthia Coan <[email protected]> yazdı:
>
> [...] I think
> use cases outside of cleanup are relatively sparse, [...]
There. There already are several ways to do cleanup on exit/return using
existing features, why add one more?
> [...] With your syntax you still have to be aware of what's
> in that trap [...]
>
Not really. If, for some reason, I didn't know what's in that trap and were
super paranoiac about it, I could do
oldaction=$(trap -P EXIT)
trap 'eval "$oldaction"; bar' EXIT
I've never been in such a situation though.
Don't get me wrong, I just like it when new features align with the old
ones and work together nicely.
--
Oğuz