Re: bash build

2012-06-02 Thread Clark WANG
On Sat, Jun 2, 2012 at 7:39 AM, rac8006 wrote: > > What is the proper way to add popd pushd dirs etc to bash.  When I currently > build bash these By default those commands should be enabled. I never added special options when buidling Bash. Not sure if it's system dependent. But from the "config

Re: Red-Hat Bug 825751 - bash-completion fails on environment variables

2012-05-28 Thread Clark WANG
On Mon, May 28, 2012 at 11:32 PM, John E. Malmberg wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=825751 > > bash-4.2.24-1.fc16.i686 > > Steps to Reproduce: > 1. Activate a terminal running a bash shell > 2. ls $HOME/ > 3. > > Actual results: > ls \$HOME/ Already discussed for quite a few t

Re: Passing variables by reference conflicts with local

2012-04-26 Thread Clark Wang
On Fri, Apr 27, 2012 at 02:49, Greg Wooledge wrote: > > I don't see this as a surprise. It's how you return values from functions > in bash. Pick a global variable (r, ret, whatever you want) and stuff the > return value into that. You can even declare your "r" locally somewhere > so that the

Re: Passing variables by reference conflicts with local

2012-04-26 Thread Clark Wang
On Fri, Apr 27, 2012 at 02:02, Bill Gradwohl wrote: > > So, if you want to make sure a sub > function can't touch a variable, put another function in between that > localises and then unsets the variable. > Sounds interesting. Will see if I can take advantage of this in future. :) > > > -- > Bi

Re: Severe Bash Bug with Arrays

2012-04-24 Thread Clark Wang
On Wed, Apr 25, 2012 at 07:21, Ted Okuzumi wrote: > I am writing this e-mai to report to report a bug in bash. > > Configuration Information [Automatically generated, do not change]: > Machine: x86_64 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'

Re: Passing variables by reference conflicts with local

2012-04-23 Thread Clark Wang
On Wed, May 5, 2010 at 01:57, Freddy Vulto wrote: > It appears that `unset' is capable of traversing down the call-stack and > unsetting variables repeatedly: > >a=0 b=0 c=0 d=0 e=0 >_unset() { unset -v b c c d d d e; } >t1() { >local a=1 b=1 c=1 d=1 >t2 >} >t2

Re: semicolon at beginning of line

2012-04-10 Thread Clark Wang
On Tue, Apr 10, 2012 at 16:38, Elliott Forney wrote: > On Tue, Apr 10, 2012 at 1:22 AM, Maarten Billemont > wrote: > > People should stop trying to execute code by parameter expansion, and > specifically stop thinking that parameter-expanded words are evaluated as > bash code. > > I still think t

<    1   2