From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from techfac.techfak.uni-bielefeld.de ([129.70.1.2]) by archone.tamu.edu with SMTP id <45329>; Tue, 11 Feb 1992 11:11:17 -0600 Received: from dahlie.TechFak.Uni-Bielefeld.DE by techfac.techfak.uni-bielefeld.de (5.65+bind 1.7+ida 1.4.2/tp.29.0890) id AA12307; Tue, 11 Feb 92 18:10:16 +0100 Received: by dahlie.techfak.uni-bielefeld.de (4.1/tp.29.0890) id AA18988; Tue, 11 Feb 92 18:10:15 +0100 Date: Tue, 11 Feb 1992 11:10:15 -0600 From: malte@techfak.uni-bielefeld.de Message-Id: <9202111710.AA18988@dahlie.techfak.uni-bielefeld.de> To: rc@archone.tamu.edu Subject: alias function in rc I as a nasty sytem administrator, I'm planning to let csh slowly die ( if the users let me, of course! ). I'd like to make rc the standart shell. To make life easier for them I wrote a little rc function which provides the functionality of the common alias definitions. I post it here hoping you will benefit from it. Let me here of bugs and incompabilities! fn alias { fn deffn { name = $^1; shift 1 newfn = 'fn ' ^ $^name ^ ' { builtin ' ^ $^* ^ ' $* }' eval $newfn } switch( $#* ){ case 0; whatis | grep '^fn '; case 1; whatis $^1; case 2; name=() newfn=() deffn $*; case 3; echo 'usage:' $0 '[alias_name [''definition'']]' >[1=2] return 1 } } Malte.