bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: feature request: new builtin `defer`, scope delayed eval


From: Oğuz İsmail Uysal
Subject: Re: feature request: new builtin `defer`, scope delayed eval
Date: Sat, 8 Oct 2022 08:49:02 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2

On 10/8/22 6:03 AM, Cynthia Coan wrote:
Otherwise, I think we can perhaps reword this into two smaller features: "function local trap signals", and
I don't think this would be a feature worth the time to implement and the complexity it would introduce. Is there any other use case for this than cleaning up temporary files on function return?

"options to safely append/prepend to a trap" (for some definition of 'safe', perhaps this just means separating by ';'? Unsure if there's a better way off the top of my head).
This can be achieved by adding a new option to `trap' that causes it to print the action string for given condition. Let this option be named `-P', the user would do something like this to update a trap:

    trap "foo;" EXIT
    trap "$(trap -P EXIT)bar;" EXIT



reply via email to

[Prev in Thread] Current Thread [Next in Thread]