Re: BASH_SUBSHELL documentation misleading

2011-03-24 Thread Clark J. Wang
On Fri, Mar 25, 2011 at 2:17 AM, Greg Wooledge wrote: > On Thu, Mar 24, 2011 at 06:07:33PM +, Marc Herbert wrote: > > Not every feature is complicated enough that it requires special > > documentation care and that it raises a discussion here. > > BASH_SUBSHELL isn't complicated at all. It's

Re: BASH_SUBSHELL documentation misleading

2011-03-24 Thread Greg Wooledge
On Thu, Mar 24, 2011 at 06:07:33PM +, Marc Herbert wrote: > Not every feature is complicated enough that it requires special > documentation care and that it raises a discussion here. BASH_SUBSHELL isn't complicated at all. It's just documented in a confusing way. It doesn't require an examp

Re: BASH_SUBSHELL documentation misleading

2011-03-24 Thread Marc Herbert
Le 24/03/2011 14:50, Greg Wooledge a écrit : > On Thu, Mar 24, 2011 at 02:33:19PM +, Marc Herbert wrote: >> I would also like to see this example in the documentation: >> >> $ ( echo sub-$BASH_SUBSHELL ); echo main-$BASH_SUBSHELL >> sub-1 >> main-0 > > Overkill. Tradeoff. > Most of the other

Re: BASH_SUBSHELL documentation misleading

2011-03-24 Thread Greg Wooledge
On Thu, Mar 24, 2011 at 02:33:19PM +, Marc Herbert wrote: > I would also like to see this example in the documentation: > > $ ( echo sub-$BASH_SUBSHELL ); echo main-$BASH_SUBSHELL > sub-1 > main-0 Overkill. Most of the other features in the manual do not have such examples, and if we added e

Re: BASH_SUBSHELL documentation misleading

2011-03-24 Thread Marc Herbert
Le 23/03/2011 20:28, Chet Ramey a écrit : > On 3/23/11 4:15 PM, Sam Liddicott wrote: > >> Yes. But a new subshell environment has been spawned. Each time that >> happens BASH_SUBSHELL should increase. >> >> Of course I know how it does work, but the man page isn't clear. It doesn't >> say that the

Re: BASH_SUBSHELL documentation misleading

2011-03-23 Thread Sam Liddicott
On 23/03/11 20:32, Maarten Billemont wrote: On 23 Mar 2011, at 21:28, Chet Ramey wrote: OK. What wording would you like to see? I don't mind the wording he proposed: On 23 Mar 2011, at 17:12, Sam Liddicott wrote: maybe it should say BASH_SUBSHELL Incremente

Re: BASH_SUBSHELL documentation misleading

2011-03-23 Thread Maarten Billemont
On 23 Mar 2011, at 21:28, Chet Ramey wrote: > > OK. What wording would you like to see? I don't mind the wording he proposed: On 23 Mar 2011, at 17:12, Sam Liddicott wrote: >maybe it should say > >BASH_SUBSHELL > Incremented by one in each nested subshell or sub

Re: BASH_SUBSHELL documentation misleading

2011-03-23 Thread Maarten Billemont
On 23 Mar 2011, at 21:15, Sam Liddicott wrote: > > On 23/03/11 18:52, Chris F.A. Johnson wrote: >> >> On Wed, 23 Mar 2011, Sam Liddicott wrote: >> >>> >>> Configuration Information [Automatically generated, do not change]: >>> Machine: i686 >>> OS: linux-gnu >>> Compiler: gcc >>> Compilation

Re: BASH_SUBSHELL documentation misleading

2011-03-23 Thread Chet Ramey
On 3/23/11 4:15 PM, Sam Liddicott wrote: > Yes. But a new subshell environment has been spawned. Each time that > happens BASH_SUBSHELL should increase. > > Of course I know how it does work, but the man page isn't clear. It doesn't > say that the increase is only visible within the subshell and

Re: BASH_SUBSHELL documentation misleading

2011-03-23 Thread Sam Liddicott
On 23/03/11 18:52, Chris F.A. Johnson wrote: On Wed, 23 Mar 2011, Sam Liddicott wrote: Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_

Re: BASH_SUBSHELL documentation misleading

2011-03-23 Thread Chris F.A. Johnson
On Wed, 23 Mar 2011, Sam Liddicott wrote: Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc'

BASH_SUBSHELL documentation misleading

2011-03-23 Thread Sam Liddicott
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DP$ uname