Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site tektools.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!harpo!decvax!tektronix!daemon!tektools!jerryp From: jerryp@tektools.UUCP (Jerry Peek) Newsgroups: net.unix,net.bugs,net.bugs.4bsd Subject: Re: Useful csh alias and free csh bug Message-ID: <175@tektools.UUCP> Date: Mon, 25-Mar-85 10:57:22 EST Article-I.D.: tektools.175 Posted: Mon Mar 25 10:57:22 1985 Date-Received: Thu, 28-Mar-85 01:23:24 EST References: <2592@garfield.UUCP> Reply-To: jerryp@tektools.UUCP (Jerry Peek) Distribution: net Organization: Tektronix, Beaverton OR Lines: 26 Xref: watmath net.unix:4032 net.bugs:581 net.bugs.4bsd:1432 Summary: In article <2592@garfield.UUCP> andrew@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@tektronix.csnet Phone: 503/627-1603