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

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

2012-08-24 Thread Michal Soltys
emphasize [[ and [ difference in rhs argument. Michal Soltys (1): execute_cmd.c: don't treat rhs of = as pattern in conditional expressions doc/bash.1|5 - execute_cmd.c |7 +++ 2 files changed, 7 insertions(+), 5 deletions(-) -- 1.7.10.4

[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

associative array assignment is more constrained when using () construct, than when using direct [] assignment

2011-11-14 Thread Michal Soltys
For example: declare -A foo foo['ab]']=bar will work perfectly fine, but: declare -A foo foo=( ['ab]']=bar ) will end with following error: -bash: [ab]]=bar: bad array subscript Same with double quotes, or backslash quoting. It's still possible to quote that right bracket with backslash insi