Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-21 Thread Greg Wooledge
I prefer plan C: leave it alone. It's working fine.

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-20 Thread Linda Walsh
Pierre Gaston wrote: Just quote the spaces and not the special chars: Pierre, your suggestion doesn't help clean up strings used inside of double brackets. I wanted to avoid the need for multiple backslashes in an expression as it makes the expression less readable and more error prone.

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-20 Thread Pierre Gaston
On Mon, Sep 20, 2010 at 10:28 PM, Linda Walsh b...@tlinx.org wrote: Pierre Gaston wrote: Just quote the spaces and not the special chars: Pierre, your suggestion doesn't help clean up strings used inside of double brackets.  I wanted to avoid the need for multiple backslashes in an

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-19 Thread Pierre Gaston
On Sun, Sep 19, 2010 at 2:54 AM, Linda Walsh b...@tlinx.org wrote: O rats, I think I understand why you have the double q'marks do what they do in double brackets. 1) Even though I've seen the construct many times, I've almost never use  glob-expression matching in a case statement.  It would

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-18 Thread Jan Schampera
I'm sorry to not answer a message directly, but I didn't get the mails of this list during the last day - no idea why. Quoting text from the pipermail archive. After initialÄy introducing =~, Chet made it consistent with =/== in a second version, means: =/== doesn't do pattern matching for

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-18 Thread Linda Walsh
Chet Ramey wrote: On 9/17/10 6:50 PM, Linda Walsh wrote: Jan Schampera wrote: == is the same as =, my suggestion is to NOT touch that. === I'm not going to say too much on this. The behavior as it exists now is very consistent: for both == and =~, any part of the rhs that's quoted is

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-18 Thread Pierre Gaston
On Sat, Sep 18, 2010 at 9:45 PM, Linda Walsh b...@tlinx.org wrote: I use == to compare constant strings. When you compare 'test' with t??t, the globbing operator has precedence and attempts to match the string t??t against test.  If it can match the glob pattern against the intput 'test',

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-18 Thread Linda Walsh
IT isn't the == operator that turns t??t into something that can match 'test' It absolutely is. If you don't think so, you fundamentally misunderstand its purpose and operation. --- Then where is the operator when you take the same chararcters t??t and place them as an argument

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-18 Thread Chet Ramey
On 9/18/10 6:12 PM, Linda Walsh wrote: IT isn't the == operator that turns t??t into something that can match 'test' It absolutely is. If you don't think so, you fundamentally misunderstand its purpose and operation. --- Then where is the operator when you take the same

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-18 Thread Linda Walsh
O rats, I think I understand why you have the double q'marks do what they do in double brackets. 1) Even though I've seen the construct many times, I've almost never use glob-expression matching in a case statement. It would appear that is the only place a glob can match an expression in

Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.

2010-09-17 Thread Andreas Schwab
Linda Walsh b...@tlinx.org writes: Or another disparity: C. t='one two three' c='one two three' 1) if [[ $t == $a ]]; then echo 'Matches'; fi 2) if [[ $t == $a ]]; then echo 'Matches'; fi So, the expressions match whether or not $a is in double quotes or not (single quotes would not