From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from artemis.le.ac.uk ([143.210.16.126]) by hawkwind.utcs.utoronto.ca with SMTP id <44666>; Thu, 18 Oct 2001 00:56:12 -0500 Received: from happy.star.le.ac.uk ([143.210.36.58]) by artemis.le.ac.uk with smtp (Exim 3.16 #1) id 15tqpz-0002gt-00 for rc@hawkwind.utcs.toronto.edu; Wed, 17 Oct 2001 14:34:23 +0100 Received: (qmail 14515 invoked from network); 17 Oct 2001 13:34:45 -0000 Received: from morpheus.star.le.ac.uk (143.210.36.121) by happy.star.le.ac.uk with QMQP; 17 Oct 2001 13:34:45 -0000 Date: Wed, 17 Oct 2001 09:34:45 -0500 Message-ID: <20011017133445.9850.qmail@happy.star.le.ac.uk> From: Tim Goodwin To: buggs-rc@splashground.de CC: rc@hawkwind.utcs.toronto.edu In-reply-to: <20011017152124.15258.qmail@mail.splashground.de> (buggs-rc@splashground.de) Subject: Re: Beta release rc-1.6b3 available References: <20011015125606.2248.qmail@happy.star.le.ac.uk> <20011017152124.15258.qmail@mail.splashground.de> > Suse Linux 7.2 with a CVS gcc-3.1 from last week does fine. Thanks for the report. (Keep 'em coming, folks!) > But there are some issues, not version dependant, that I don't understand. > This will get out of control: > > ; fn l {ls -l $*} > ; fn l {l -a $*} > ; l Your function `l' always calls itself recursively, so it rapidly runs out of stack. Remember that, unlike other shells, rc is not a macro processor. In particular, the `l' in the function body of your second definition is *not* expanded using the previous definition of `fn l'. (You can always use `whatis' to see the current definition of a function.) A simple fn l { ls -la $* } is probably what you want. Also, check out the `builtin' builtin, which allows a function to call a builtin or external command of the same name without recursing: fn ls { builtin ls -F $* } > And what about job control, how do I handle that? This shell does not have job control. It has been said (by Duff? Pike? Rakitzis? I forget...) that job control adds a deal of complexity to handle just the easy part of a hard problem. The suggested alternative in a windowing environment is to open a new window. If you're not in a windowing environment, you might like the `screen' program, which does both the easy and hard parts of the problem. There's also a "tabbed" version of gnome-terminal around, called `multignometerm'. Tim.