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: 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: 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

Re: Question about the return value of 'local'

2012-12-13 Thread Francis Moreau
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 in the manual. > > `help' is a quick reference -- a handy shortcut. The aut

Re: Question about the return value of 'local'

2012-12-13 Thread Francis Moreau
On Thu, Dec 13, 2012 at 3:25 PM, Chet Ramey wrote: >> Actually I was asking for the case when 'local' is not used: >> >> foo=$(echo bar; false) >> >> this assignment expression returns false, and I'm wondering where >> that's documented. > > Look in the SIMPLE COMMAND EXPANSION section of the ma

Re: Question about the return value of 'local'

2012-12-13 Thread Chet Ramey
> Actually I was asking for the case when 'local' is not used: > > foo=$(echo bar; false) > > this assignment expression returns false, and I'm wondering where > that's documented. Look in the SIMPLE COMMAND EXPANSION section of the man page: If there is a command name left after expa

Re: Question about the return value of 'local'

2012-12-13 Thread Chet Ramey
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 in the manual. `help' is a quick reference -- a handy shortcut. The authoritative documentation is still the manual page and texinfo

Re: Question about the return value of 'local'

2012-12-13 Thread Francis Moreau
On Thu, Dec 13, 2012 at 9:44 AM, Andreas Schwab wrote: > Francis Moreau writes: > >> The help of 'local' is rather obscure about the description on its return >> value: >> >> Returns success unless an invalid option is supplied, an >> error occurs, or the shell is not executing a functio

Re: Question about the return value of 'local'

2012-12-13 Thread Francis Moreau
On Thu, Dec 13, 2012 at 9:44 AM, Bob Proulx wrote: > Francis Moreau wrote: >> I found that the return value of 'local' keyword is counter intuitive >> when the value of the assignment is an expression returning false. In >> that case the return value of local is still true. For example: >> >> lo

Re: Question about the return value of 'local'

2012-12-13 Thread Andreas Schwab
Francis Moreau writes: > The help of 'local' is rather obscure about the description on its return > value: > > Returns success unless an invalid option is supplied, an > error occurs, or the shell is not executing a function. > > "an error occurs" is rather meaningless IMHO. See the ma

Re: Question about the return value of 'local'

2012-12-13 Thread Bob Proulx
Francis Moreau wrote: > I found that the return value of 'local' keyword is counter intuitive > when the value of the assignment is an expression returning false. In > that case the return value of local is still true. For example: > > local foo=$(echo bar; false) > > returns true Yes. The cr

Question about the return value of 'local'

2012-12-13 Thread Francis Moreau
Hello, I found that the return value of 'local' keyword is counter intuitive when the value of the assignment is an expression returning false. In that case the return value of local is still true. For example: local foo=$(echo bar; false) returns true whereas: foo=$(echo bar; false) retur