Re: cannot declare local variables if they're readonly

2015-07-28 Thread Chet Ramey
On 7/23/15 6:52 PM, isabella parakiss wrote: > > No. Don't minimize this, it's not only about BASH_REMATCH. OK. You did, however, spend an entire message on it. > The fact that a certain special variable is readonly for no real reason > doesn't change this absurd nonsense about any other glob

Re: cannot declare local variables if they're readonly

2015-07-23 Thread isabella parakiss
On 7/23/15, Chet Ramey wrote: > This is an excellent time to point out that it's to everyone's advantage > to be as complete as possible when describing a problem on the list, > rather than revealing additional details one at a time. > > There's no way anyone would have guessed that you were encou

Re: cannot declare local variables if they're readonly

2015-07-23 Thread Chet Ramey
On 7/23/15 10:57 AM, isabella parakiss wrote: > On 7/23/15, Greg Wooledge wrote: >> People who use "readonly" are generally doing so in the context of a >> "restricted shell" (yes, commence laughter) or other situation where >> that specific variable is the key to unlocking something that the >> a

Re: cannot declare local variables if they're readonly

2015-07-23 Thread Greg Wooledge
On Thu, Jul 23, 2015 at 04:57:42PM +0200, isabella parakiss wrote: > The fact is, I found out this by using BASH_REMATCH, trying to use it in > different functions without interfering with each other. Ah! That changes things. :) imadev:~$ [[ x =~ y ]] imadev:~$ declare -p BASH_REMATCH declare -a

Re: cannot declare local variables if they're readonly

2015-07-23 Thread isabella parakiss
On 7/23/15, Greg Wooledge wrote: > People who use "readonly" are generally doing so in the context of a > "restricted shell" (yes, commence laughter) or other situation where > that specific variable is the key to unlocking something that the > administrator does not want the user to unlock. The

Re: cannot declare local variables if they're readonly

2015-07-23 Thread Chet Ramey
On 7/22/15 7:12 PM, isabella parakiss wrote: > From variables.c > >The test against old_var's context > level is to disallow local copies of readonly global variables (since I > believe that this could be a security hole). > > Can you please expla

Re: cannot declare local variables if they're readonly

2015-07-23 Thread Stephane Chazelas
2015-07-23 01:12:01 +0200, isabella parakiss: > From variables.c > >The test against old_var's context > level is to disallow local copies of readonly global variables (since I > believe that this could be a security hole). > > Can you please expl

Re: cannot declare local variables if they're readonly

2015-07-23 Thread Greg Wooledge
On Thu, Jul 23, 2015 at 01:12:01AM +0200, isabella parakiss wrote: > From variables.c > >The test against old_var's context > level is to disallow local copies of readonly global variables (since I > believe that this could be a security hole). >