[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFE: request for quotes as grouping operators to work in brackets as
From: |
Linda Walsh |
Subject: |
Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere. |
Date: |
Mon, 20 Sep 2010 12:28:14 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
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.
Note that the same problem and solution exist when you use filename generation:
for f in /some path/ withspaces/*; do # doesn't work the path contains spaces
----
I'm aware of that, but since [[ and ]] are new, and =~ is new, there
is no legal interpretation for multiple arguments on either side of the =~
operator.
Since =~ permits comparing variables _without_ putting quotes around them,
(as would normally be the case if you used the single square brackets and
plain '='), why not extend that idea to not needing quotes between
the =~ and either side of the double square brackets so literal strings
benefit from not needing quotes as well.
Of course, if quotes *are* included on the rhs, then the pattern matching
(glob or regex) would be disabled as happens now.
Is there a downside to this syntax or this idea?
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., (continued)
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Chet Ramey, 2010/09/17
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Linda Walsh, 2010/09/18
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Pierre Gaston, 2010/09/18
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Chet Ramey, 2010/09/18
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Linda Walsh, 2010/09/18
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Chet Ramey, 2010/09/18
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Linda Walsh, 2010/09/18
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Pierre Gaston, 2010/09/19
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.,
Linda Walsh <=
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Pierre Gaston, 2010/09/20
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Linda Walsh, 2010/09/21
- Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Greg Wooledge, 2010/09/21
- Re: RFE: request for grouping mechanism to work in double brackets where otherewise illegal, Linda Walsh, 2010/09/22
- Re: RFE: request for grouping mechanism to work in double brackets where otherewise illegal, Dennis Williamson, 2010/09/22
- Re: RFE: request for grouping mechanism to work in double brackets where otherewise illegal, Marc Herbert, 2010/09/23
- Re: RFE: request for grouping mechanism to work in double brackets where otherewise illegal, Pierre Gaston, 2010/09/23
- Re: RFE: request for grouping mechanism to work in double brackets where otherewise illegal, Linda Walsh, 2010/09/23
- Re: RFE: request for grouping mechanism to work in double brackets where otherewise illegal, Pierre Gaston, 2010/09/24
Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere., Linda Walsh, 2010/09/17