Re: [bash-bug] no local bash_history created or written to if existing (~/.bash_history

2011-03-09 Thread Dr. Werner Fink
On Tue, Mar 08, 2011 at 09:40:26PM -0500, Chet Ramey wrote: > On 3/8/11 11:12 AM, Chet Ramey wrote: > > > I might be able to finesse this particular case based on the state that > > readline exports to the calling application. > > I think I was able to do that. Try the attached patch; it works

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Chet Ramey
On 3/7/11 11:48 PM, Peggy Russell wrote: > It would be helpful if indirection was explained in the documentation for > [[ expression ]], [ expression ], and declare. The existing documentation seems pretty clear: Shell variables are allowed as operands; parameter expansion is per- formed befor

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Peggy Russell
> The existing documentation seems pretty clear: > ... > The value of a variable is evaluated as an arithmetic expression when > it is referenced, or when a variable which has been given the integer > attribute using declare -i is assigned a value. A null value evaluates > to 0. A shell var

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Chet Ramey
> > For example: > > unset a; declare a="a"; [[ a -lt 3 ]]; echo $? > bash: [[: a: expression recursion level exceeded (error token is "a") > 1 > > Shouldn't the return code from this expression be 2, rather than 1? What does it matter? Failure is failure. -- ``The lyf so short, the craft so

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Eric Blake
On 03/09/2011 02:54 PM, Chet Ramey wrote: >> >> For example: >> >> unset a; declare a="a"; [[ a -lt 3 ]]; echo $? >> bash: [[: a: expression recursion level exceeded (error token is "a") >> 1 >> >> Shouldn't the return code from this expression be 2, rather than 1? > > What does it matter? Failur

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Chet Ramey
> On 03/09/2011 02:54 PM, Chet Ramey wrote: > >> > >> For example: > >> > >> unset a; declare a="a"; [[ a -lt 3 ]]; echo $? > >> bash: [[: a: expression recursion level exceeded (error token is "a") > >> 1 > >> > >> Shouldn't the return code from this expression be 2, rather than 1? > > > > What d

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Clark J. Wang
On Thu, Mar 10, 2011 at 5:14 AM, Peggy Russell wrote: > > The existing documentation seems pretty clear: > > ... > > The value of a variable is evaluated as an arithmetic expression when > > it is referenced, or when a variable which has been given the integer > > attribute using declare -i is

Re: variable name and its' value are the same characters causes recursion error

2011-03-09 Thread Clark J. Wang
On Thu, Mar 10, 2011 at 5:14 AM, Peggy Russell wrote: > > The existing documentation seems pretty clear: > > ... > > The value of a variable is evaluated as an arithmetic expression when > > it is referenced, or when a variable which has been given the integer > > attribute using declare -i is

case modification won't work with pattern

2011-03-09 Thread Jerry Wang
Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash