🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #822

Re: bash bug report

#822
From: Bill Trost
Date: Fri, 08 Dec 1989 22:54
29 lines
1160 bytes
>I've been told by devout ksh users that it's missing autoload functions.

Hah, you friends just don't know how to write ksh.  I did the same
thing with bash with a few minutes playing.  Presumably, the ksh
mechanism is equivalent.

Anyone know how to do this without a tmp file? ". <<" doesn't work.

autoload() {
	echo $1 \(\) \{ echo . $2 2\>\&1 \; . $2 \} > /tmp/au.$$
	. /tmp/au.$$
	rm /tmp/au.$$
}

Sample use (spam should be defined in ~/spam):

bash% autoload spam ~/spam
bash% type spam
spam is a function
spam() { echo . /u/trost/spam 2>&1 ; . /u/trost/spam }
bash% spam
. /u/trost/spam
/u/trost/spam: No such file or directory


trost%reed@tektronix.tek.com
--
Bill Trost
trost@reed.bitnet, but probably trost%reed@tektronix.tek.com
Technical Details
Message-ID: <13693@reed.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!orc!mipos3!omepd!pzbaum!reed!trost
References: <8912030428.AA01426@kailand.kai.com> <3749@convex.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!sun-barr!decwrl!orc!mipos3!omepd!pzbaum!reed!trost
From: trost@reed.bitnet (Bill Trost)
Newsgroups: gnu.bash.bug
Subject: Re: bash bug report
Message-ID: <13693@reed.UUCP>
Date: 8 Dec 89 22:54:12 GMT
References: <8912030428.AA01426@kailand.kai.com> <3749@convex.UUCP>
Sender: news@reed.UUCP
Distribution: gnu
Lines: 29