Re: Case (in)sensitivity of complete -X patterns?

2010-09-18 Thread Ville Skyttä
On Saturday 18 September 2010, Chet Ramey wrote: > On 9/16/10 2:19 PM, Ville Skyttä wrote: > > Hello, > > > > I was looking for a way to make complete/compgen -X filter patterns case > > insensitive, but it seems that the -X patterns are not affected by > > nocaseglob nor nocasematch, is that corr

Re: trap 'echo "trap exit on ${LINENO}"' EXIT -> wrong linenumber

2010-09-18 Thread Eric Blake (cygwin)
On 09/17/2010 06:37 PM, Chet Ramey wrote: I guess you could make a case to not reset $LINENO for the exit trap due to this sentence in Posix (though $LINENO is not Posix): LINENO may be optional in the bare minimum POSIX compliance, but it is certainly specified, and I see no reason why bash s

Re: trap 'echo "trap exit on ${LINENO}"' EXIT -> wrong linenumber

2010-09-18 Thread Chet Ramey
On 9/18/10 12:57 PM, Eric Blake (cygwin) wrote: > On 09/17/2010 06:37 PM, Chet Ramey wrote: >> I guess you could make a case to not reset $LINENO for the exit trap >> due to this sentence in Posix (though $LINENO is not Posix): > > LINENO may be optional in the bare minimum POSIX compliance, but i

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 mat

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 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', then it subst

Re: trap 'echo "trap exit on ${LINENO}"' EXIT -> wrong linenumber

2010-09-18 Thread Eric Blake
On 09/18/2010 12:18 PM, Chet Ramey wrote: On 9/18/10 12:57 PM, Eric Blake (cygwin) wrote: On 09/17/2010 06:37 PM, Chet Ramey wrote: I guess you could make a case to not reset $LINENO for the exit trap due to this sentence in Posix (though $LINENO is not Posix): LINENO may be optional in the b

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

2010-09-18 Thread Chet Ramey
On 9/18/10 2:45 PM, Linda Walsh wrote: > > > 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 consi

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 t

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

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 'o

How to deal with space in command line?

2010-09-18 Thread Peng Yu
Hi, stat --printf "%y %n\n" `find . -type f -print` I could use the following trick to stat each file separately. But I prefer to stat all the files at once. I'm wondering if there is any easy way to converted the strings returned by find if there are special characters such as space by adding '\

Re: How to deal with space in command line?

2010-09-18 Thread Chris F.A. Johnson
On Sat, 18 Sep 2010, Peng Yu wrote: stat --printf "%y %n\n" `find . -type f -print` I could use the following trick to stat each file separately. But I prefer to stat all the files at once. I'm wondering if there is any easy way to converted the strings returned by find if there are special cha

Re: How to deal with space in command line?

2010-09-18 Thread Pierre Gaston
On Sun, Sep 19, 2010 at 5:26 AM, Chris F.A. Johnson wrote: > On Sat, 18 Sep 2010, Peng Yu wrote: > >> stat --printf "%y %n\n" `find . -type f -print` >> >> I could use the following trick to stat each file separately. But I >> prefer to stat all the files at once. I'm wondering if there is any >>

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

2010-09-18 Thread Pierre Gaston
On Sun, Sep 19, 2010 at 2:54 AM, Linda Walsh 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 appear > t