bug-bash
[Top][All Lists]
Advanced

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

Re: Feature request: save/restore BASH_REMATCH across debug hook calls


From: Chet Ramey
Subject: Re: Feature request: save/restore BASH_REMATCH across debug hook calls
Date: Wed, 16 Oct 2019 15:14:41 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 10/16/19 1:34 PM, Rocky Bernstein wrote:
> Current in bash 5.0 and earlier, the value of BASH_REMATCH might chanted
> inside a debug hook.
> 
> Since BASH_REMATCH is read-only, resetting the value on hook return to the
> debugged program is a bit tricky and fragile...

How about we just make it not read-only? The shell will still set it when
it does regexp matching.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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