Useful csh alias and free csh bug

Andrew Draskoy andrew at garfield.UUCP
Fri Mar 22 15:29:08 AEST 1985


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 bug is so minor that I'm not even going to try and fix it,
however I thought I'd mention it in case someone is making a list
(a very big list) of csh bugs.

If you use ec to change your command to "history", you get (for example):

history
   189  set history=4
   190  ls
   191  ec
 -1000  ls%

The % at the end is your next prompt.  I have not been able to duplicate
this behavior in any other manner.
-- 
Andrew Draskoy
UUCP:	{akgua,allegra,cbosgd,ihnp4,mcvax,utcsri}!garfield!andrew
CDNNET:	andrew at garfield.mun.cdn
--
The opinions expressed above may not represent those of the author
after he has had some sleep.



More information about the Net.bugs mailing list