Re: [PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Chet Ramey
On 8/24/12 11:03 AM, Michal Soltys wrote: >>> Perhaps he is assuming the man page is exhaustive. The section for the >>> [[ command only mentions the == and != operators: >> >> Maybe. The `CONDITIONAL EXPRESSIONS' section makes it clear they're >> identical. >> > > This section only mentions st

Re: [PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Michal Soltys
On 2012-08-24 16:34, Chet Ramey wrote: On Fri, Aug 24, 2012 at 10:01:32AM -0400, Chet Ramey wrote: > On 8/24/12 8:54 AM, Michal Soltys wrote: > > In case of single '=' operator used in [[ ]], rhs argument > > was treated as a pattern. Only == and != should treat rhs argument as a > > pattern, so

Re: [PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Greg Wooledge
On Fri, Aug 24, 2012 at 10:34:44AM -0400, Chet Ramey wrote: > > On Fri, Aug 24, 2012 at 10:01:32AM -0400, Chet Ramey wrote: > > > On 8/24/12 8:54 AM, Michal Soltys wrote: > > > > In case of single '=' operator used in [[ ]], rhs argument > > > > was treated as a pattern. Only == and != should trea

Re: [PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Chet Ramey
> On Fri, Aug 24, 2012 at 10:01:32AM -0400, Chet Ramey wrote: > > On 8/24/12 8:54 AM, Michal Soltys wrote: > > > In case of single '=' operator used in [[ ]], rhs argument > > > was treated as a pattern. Only == and != should treat rhs argument as a > > > pattern, so this patch fixes it. > > > >

Re: [PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Greg Wooledge
On Fri, Aug 24, 2012 at 10:01:32AM -0400, Chet Ramey wrote: > On 8/24/12 8:54 AM, Michal Soltys wrote: > > In case of single '=' operator used in [[ ]], rhs argument > > was treated as a pattern. Only == and != should treat rhs argument as a > > pattern, so this patch fixes it. > > Incorrect; `='

Re: [PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Chet Ramey
On 8/24/12 8:54 AM, Michal Soltys wrote: > In case of single '=' operator used in [[ ]], rhs argument > was treated as a pattern. Only == and != should treat rhs argument as a > pattern, so this patch fixes it. Incorrect; `=' and `==' are identical. -- ``The lyf so short, the craft so long to l

Re: [PATCH] rhs argument of single = in [[ ]] is also treated as pattern

2012-08-24 Thread Chet Ramey
On 8/24/12 8:54 AM, Michal Soltys wrote: > Not sure how savannah reports are followed, so small headups of a thing I > experienced which probably is a bug. I made small bug report at > https://savannah.gnu.org/support/?108110 - though obviously the behavior as > described for '==' is valid (rhs is

Re: bash does filename expansion when assigning to array member in compound form

2012-08-24 Thread Chet Ramey
On 8/22/12 8:58 PM, Chet Ramey wrote: > Then how about this: words inside a compound assignment statement that are > recognized as assignment statements ([1]=foo) are expanded like assignment > statements (no brace expansion, globbing, or word splitting). Other words > undergo all the expansions.

[PATCH] rhs argument of single = in [[ ]] is also treated as pattern

2012-08-24 Thread Michal Soltys
Not sure how savannah reports are followed, so small headups of a thing I experienced which probably is a bug. I made small bug report at https://savannah.gnu.org/support/?108110 - though obviously the behavior as described for '==' is valid (rhs is pattern). So what I suspected was that [[ ]] tr

[PATCH 1/1] execute_cmd.c: don't treat rhs of = as pattern in conditional expressions

2012-08-24 Thread Michal Soltys
In case of single '=' operator used in [[ ]], rhs argument was treated as a pattern. Only == and != should treat rhs argument as a pattern, so this patch fixes it. --- doc/bash.1|5 - execute_cmd.c |7 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/bash