Re: redirections preceded by a word with builtins inconsistent

2016-05-23 Thread Dan Douglas
On Sun, May 22, 2016 at 1:06 PM, Chet Ramey wrote: > On 5/21/16 5:16 PM, adonis papaderos wrote: > >> Bash Version: 4.3 >> Patch Level: 42 >> Release Status: release >> >> Description: >> When using redirections preceded by a word on builtins >> 'i.e. : {varname}<&1' >> the red

Re: coproc and existing variables

2016-05-23 Thread Grisha Levit
On Mon, May 23, 2016 at 1:37 PM, Chet Ramey wrote: > It's documented as being managed by > the coproc command, and if you choose to use it yourself, all bets are > off, similarly to how getopts manages $OPTARG. > I see; makes sense. This does allow unbind arbitrary readonly variables that end i

Re: nameref subscript assignment with unset target var

2016-05-23 Thread Chet Ramey
On 5/22/16 6:43 PM, Grisha Levit wrote: > This multiple-vars-at-same-scope thing happens also happens in the case > that the nameref points to a variable at a higher scope of the same name as > the nameref. I suspect this is related to the nameref resolution issue here > http://lists.gnu.org/archiv

Re: Global variable modification by nameref chain

2016-05-23 Thread Chet Ramey
On 5/23/16 11:32 AM, Grisha Levit wrote: > > On Sun, May 22, 2016 at 10:08 PM, Chet Ramey > wrote: > > Should the assignment work? I'm considering changing the assignments to > work more like the references. > > > I think it would be useful for the assignme

Re: coproc and existing variables

2016-05-23 Thread Chet Ramey
On 5/23/16 12:45 PM, Grisha Levit wrote: > On Thu, May 19, 2016 at 11:05 AM, Chet Ramey > wrote: > > > * The %s_PID variable is unbound unconditionally > > > > BTW, this is exploitable for unsetting read-only variables. > > Same change as for get

Re: coproc and existing variables

2016-05-23 Thread Grisha Levit
On Thu, May 19, 2016 at 11:05 AM, Chet Ramey wrote: > * The %s_PID variable is unbound unconditionally > > > > BTW, this is exploitable for unsetting read-only variables. > > Same change as for getopts. > This should probably instead be the same change as was previously done for unsetting t

Re: Global variable modification by nameref chain

2016-05-23 Thread Grisha Levit
On Sun, May 22, 2016 at 10:08 PM, Chet Ramey wrote: > Should the assignment work? I'm considering changing the assignments to > work more like the references. > I think it would be useful for the assignment to work, as that allows functions to take variable names as arguments without worrying a

Re: redirections preceded by a word with builtins inconsistent

2016-05-23 Thread Greg Wooledge
On Sun, May 22, 2016 at 09:48:47PM +0300, adonis papaderos wrote: > > > When using redirections preceded by a word on builtins > > > 'i.e. : {varname}<&1' > > > the redirection persists to the current shell. That surprises me, but if Chet says it's not a bug, then so be it. Si