bash 4.4 and BASHOPTS containing extdebug in env

2016-04-25 Thread Grisha Levit
This seems new for 4.4. Having extdebug in BASHOPTS seems to change the invocation behavior to mimic that of having specified the --debugger option, which I don't think is usually the intention: $ shopt -s extdebug; export BASHOPTS $ bash -c 'echo $BASH_VERSION; shopt -p extdebug' 4.3.42(1)-relea

Re: param expansion with single-character special vars in the environment

2016-04-25 Thread Grisha Levit
A related issue is with adding the nameref attribute to a readonly variable. Not sure if that should be allowed, as it can be used to change the meaning of the variable, even for variables that bash is using internally: $ TIMEFORMAT='%R' $ time bash -c 'readonly TMOUT=5; read'5.007 $ time bash -c

Re: Avoid asterisk expansion when it selects "everything"

2016-04-25 Thread Anis ELLEUCH
Thanks for all your responses. I think that bash as a programming language is also an everyday tool. The idea of a strong character that selects all files, is it bad? Le jeu. 14 avr. 2016 à 09:07, Stephane Chazelas a écrit : > 2016-04-13 11:23:01 +, Anis ELLEUCH: > > Hello everybody, > > >

param expansion with single-character special vars in the environment

2016-04-25 Thread Grisha Levit
There seems to be a bug that if an array variable with a name matching one of the special single-character variables exists, then that variable is used during substring expansion and parameter transformation. There is also a potential issue with namerefs, in that they allow creating/modifying vari

Re: Unexpected exit

2016-04-25 Thread Chet Ramey
On 4/25/16 11:05 AM, Paulo Bardes wrote: > I came about this weird behavior when comparing some test cases I wrote for a > little shell I made for a CS class. Here's the thing: > > $ echo | echo $(sleep 5) # ^Z and then bg to reproduce > > If you just let it run everything is fine, but the weird

Re: Unexpected exit

2016-04-25 Thread Greg Wooledge
On Mon, Apr 25, 2016 at 12:05:34PM -0300, Paulo Bardes wrote: > $ echo | echo $(sleep 5) # ^Z and then bg to reproduce > > If you just let it run everything is fine, but the weird thing is when you > stop > it and resume in background bash will quit when the command finishes. Confirmed with bash

Unexpected exit

2016-04-25 Thread Paulo Bardes
I came about this weird behavior when comparing some test cases I wrote for a little shell I made for a CS class. Here's the thing: $ echo | echo $(sleep 5) # ^Z and then bg to reproduce If you just let it run everything is fine, but the weird thing is when you stop it and resume in background ba