Re: shouldn't /+(??) capture 2 letter files only?

2012-12-14 Thread DJ Mills
On Fri, Dec 14, 2012 at 8:37 PM, gregrwm wrote: > > echo !(??|foo|bar) > > precisely where i started this thread, !(??) > +(??) and !(??) are completely different things. !(??) was never mentioned in the original question, and should work as expected.

Re: shouldn't /+(??) capture 2 letter files only?

2012-12-14 Thread Rene Herman
On 12/15/2012 02:37 AM, gregrwm wrote: echo !(??|foo|bar) precisely where i started this thread, !(??) Not sure if I understand you correctly because you indeed mentioned the !(foo|bar|baz) syntax in your first post -- but the thread was actually about +(??) ... That is, are you satisfie

Re: shouldn't /+(??) capture 2 letter files only?

2012-12-14 Thread gregrwm
> echo !(??|foo|bar) precisely where i started this thread, !(??)

Re: shouldn't /+(??) capture 2 letter files only?

2012-12-14 Thread Rene Herman
On 12/14/2012 11:29 PM, gregrwm wrote: well what i actually wanted was to conjure an expression that selected a small few files, and then invert the expression, in particular i wanted to isolate all 2 letter names plus a few other names, and then invert, so that the aforementioned were not in th

Re: why does errexit exist in its current utterly useless form?

2012-12-14 Thread Eric Blake
On 12/14/2012 04:07 PM, matei.da...@gmail.com wrote: > I recently worked on a project involving many bash scripts, and I've been > trying to use errexit to stop various parts of a script as soon as anything > returns a non-0 return code. As it turns out, this is an utterly useless > endeavour. I

why does errexit exist in its current utterly useless form?

2012-12-14 Thread matei . david
I recently worked on a project involving many bash scripts, and I've been trying to use errexit to stop various parts of a script as soon as anything returns a non-0 return code. As it turns out, this is an utterly useless endeavour. In asking this question on this forum, I hope somebody out the

Re: shouldn't /+(??) capture 2 letter files only?

2012-12-14 Thread gregrwm
>> i wanted to move a bunch of files & directories, all except a certain >> few, so i figured i'd use !(this|or|that). so first i looked to see >> if +(this|or|that) isolated what i expected... > > you would want /@(??) or simply /??, since there's no need for extglob for > that. well what i act

Re: RFE: printf '%(fmt)T' prints current time by default

2012-12-14 Thread Chet Ramey
On 12/14/12 12:03 PM, Dan Douglas wrote: > On Friday, December 14, 2012 09:57:11 AM Chet Ramey wrote: I think the ksh behavior is makes more sense so can we use the current time as the default? -Clark >>> >>> I agree that a null or empty argument as equivalent to -1 is a better

Re: Question about the return value of 'local'

2012-12-14 Thread Stefano Lattarini
On 12/14/2012 06:58 PM, Bill Gradwohl wrote: > My point was to DESIGN for html and the rich environment it offers, not to > try to convert a Model T into a Mercedes. > > I'm not wild about a wiki either, if its a free for all. If on the other > hand, it is a submission platform that gets reviewed

Re: Question about the return value of 'local'

2012-12-14 Thread Stefano Lattarini
On 12/14/2012 06:07 PM, Bill Gradwohl wrote: > I'm not trying to start a war, but ... > > Has anyone entertained the idea of getting rid of the man pages and the > info system? Those are relics of the tty era. > Don't make the error of confusing the texinfo system with just the info format. I, f

Re: Question about the return value of 'local'

2012-12-14 Thread Bill Gradwohl
My point was to DESIGN for html and the rich environment it offers, not to try to convert a Model T into a Mercedes. I'm not wild about a wiki either, if its a free for all. If on the other hand, it is a submission platform that gets reviewed and edited by the developers then it's possibly of bene

Re: Question about the return value of 'local'

2012-12-14 Thread Steven W. Orr
On 12/14/2012 12:07 PM, Bill Gradwohl wrote: I'm not trying to start a war, but ... Has anyone entertained the idea of getting rid of the man pages and the info system? Those are relics of the tty era. We have graphical interfaces today with capabilities that could enhance providing and then fin

Re: Question about the return value of 'local'

2012-12-14 Thread Bill Gradwohl
I'm not trying to start a war, but ... Has anyone entertained the idea of getting rid of the man pages and the info system? Those are relics of the tty era. We have graphical interfaces today with capabilities that could enhance providing and then finding better information. Wouldn't a browser ba

Re: RFE: printf '%(fmt)T' prints current time by default

2012-12-14 Thread Dan Douglas
On Friday, December 14, 2012 09:57:11 AM Chet Ramey wrote: > > > I think the ksh behavior is makes more sense so can we use the current > > > time > > > as the default? > > > > > > -Clark > > > > I agree that a null or empty argument as equivalent to -1 is a better > > default. > > "0" is iden

Re: Question about the return value of 'local'

2012-12-14 Thread Dan Douglas
On Friday, December 14, 2012 08:37:02 AM Francis Moreau wrote: > On Thu, Dec 13, 2012 at 3:19 PM, Chet Ramey wrote: > > On 12/13/12 3:56 AM, Francis Moreau wrote: > > > >> I see thanks. > >> > >> Somehow I thought that help(1) would have given nothing more nothing > >> less than what was described

Re: RFE: printf '%(fmt)T' prints current time by default

2012-12-14 Thread Chet Ramey
> > I think the ksh behavior is makes more sense so can we use the current time > > as the default? > > > > -Clark > > I agree that a null or empty argument as equivalent to -1 is a better > default. > "0" is identical to the current behavior for empty/unset, so no functionality > is lost. Th

Questions to bash "read" builtin functionality

2012-12-14 Thread Fiedler Roman
Hello list, One of our bash-scrips failed with very low frequency but randomly. The result was that exactly 1 byte was lost, so the string returned by "read -t 1" was too short. The culprit seems to be the built-in read function itself, the probability of failure was about 1:10 in our case.

Re: Question about the return value of 'local'

2012-12-14 Thread Chet Ramey
On 12/14/12 8:21 AM, Greg Wooledge wrote: > I do sympathize with the difficulty of finding the relevant information > in the manual sometimes, though, especially for builtins that are common > words like 'set'. That's where the superior indexing and structure of the info file format demonstrate t

Re: Question about the return value of 'local'

2012-12-14 Thread Chet Ramey
On 12/14/12 2:37 AM, Francis Moreau wrote: >> `help' is a quick reference -- a handy shortcut. The authoritative >> documentation is still the manual page and texinfo document. > > Then maybe an option should be added to 'local' to display the full > description that one can get from the manual,

Re: Question about the return value of 'local'

2012-12-14 Thread Francis Moreau
On Fri, Dec 14, 2012 at 2:21 PM, Greg Wooledge wrote: > On Fri, Dec 14, 2012 at 08:37:02AM +0100, Francis Moreau wrote: >> Then maybe an option should be added to 'local' to display the full >> description that one can get from the manual, or maybe change the >> behaviour of '-m' switch ? > > Almo

Re: Question about the return value of 'local'

2012-12-14 Thread Greg Wooledge
On Fri, Dec 14, 2012 at 08:37:02AM +0100, Francis Moreau wrote: > Then maybe an option should be added to 'local' to display the full > description that one can get from the manual, or maybe change the > behaviour of '-m' switch ? Almost every builtin command has a shorter and less informative des