Useful csh alias and free csh bug

Jerry Peek jerryp at tektools.UUCP
Tue Mar 26 01:57:22 AEST 1985


In article <2592 at garfield.UUCP> andrew at garfield.UUCP (Andrew Draskoy) writes:
> Here is a useful csh alias which I use to edit my last command.
> I'm posting it here since others have told me that they have also
> found it useful.
> 
> alias ec source ~/bin/ec
> where ~/bin/ec contains:
> 
> echo !-1:q > /tmp/ec$$
> $EDITOR /tmp/ec$$
> cat /tmp/ec$$
> eval `cat /tmp/ec$$`
> rm /tmp/ec$$

The first line of "ec", !-1:q, referred to the ec command *itself*,
instead of the previous command... it should look like this instead:

	echo !-2:q > /tmp/ec$$

Otherwise, "ec" works great.

--Jerry Peek, UNIX Training Instructor, Tektronix, Inc.
US Mail:    MS 76-036, P.O. Box 500, Beaverton, OR 97077
uucp:       {allegra,decvax,hplabs,ihnp4,ucbvax}!tektronix!tektools!jerryp
CS,ARPAnet: jerryp%tektools at tektronix.csnet
Phone:      503/627-1603



More information about the Net.bugs mailing list