Re: Function/alias recursion

2007-01-16 Thread Chet Ramey
Tim Waugh wrote: > What is the intended behaviour for this sort of thing?: Bash does not attempt to trap infinite recursion, so whatever your system does with it is what will happen. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day

Re: Function/alias recursion

2007-01-16 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Tim Waugh on 1/16/2007 5:45 AM: > What is the intended behaviour for this sort of thing?: Infinite recursion, within the limits of your stack. > > $ cat <<"EOF" >trouble > hello () > { > pwd > } > alias pwd="hello" > EOF > The beh

Function/alias recursion

2007-01-16 Thread Tim Waugh
What is the intended behaviour for this sort of thing?: $ cat <<"EOF" >trouble hello () { pwd } alias pwd="hello" EOF $ source trouble $ source trouble $ pwd The behaviour I've observed with bash-3.2 and several earlier releases is that bash consumes all available memory and then crashes. Ti