From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from oldp.astro.wisc.edu ([128.104.39.15]) by hawkwind.utcs.toronto.edu with SMTP id <2223>; Wed, 19 May 1993 00:40:54 -0400 Received: by oldp.astro.wisc.edu (5.65/DEC-Ultrix/4.3) id AA03713; Tue, 18 May 1993 23:40:47 -0500 Message-Id: <9305190440.AA03713@oldp.astro.wisc.edu> To: rc@hawkwind.utcs.toronto.edu Subject: lazy auto-loading of functions Date: Wed, 19 May 1993 00:40:46 -0400 From: Alan Watson X-Mts: smtp Jealous of Paul Haahr's beautiful implementation of lazy auto-loading of functions in es, I tried to do something similar in rc (which I'm still using as my everyday shell). Obviously, one cannot use his approach directly, but one can go some of the way to reducing the size of the environment as follows: fnlib = $home/fn fn load { builtin . $fnlib/$1 } builtin cd $fnlib name = () for ( name in * ) fn $name { load $0 && $0 $* } builtin cd This is just what you need for those rarely used but sometimes essential functions. Alan.