Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ulysses!hector!ekrell From: ekrell@hector.UUCP (Eduardo Krell) Newsgroups: comp.sys.att Subject: Re: $_ Keywords: ksh csh sh $_ Message-ID: <11503@ulysses.homer.nj.att.com> Date: 9 May 89 13:02:41 GMT References: <1083@adds.newyork.NCR.COM> Sender: netnews@ulysses.homer.nj.att.com Reply-To: ekrell@hector.UUCP (Eduardo Krell) Organization: AT&T Bell Laboratories Lines: 19 In article <1083@adds.newyork.NCR.COM> tanya@adds.newyork.NCR.COM (Tanya Katz) writes: >At least if you could see the the argument expanded >wrong, you can possibly undo the damage. But, alas there is no >expansion, and even when you call up a history the $_ appears as $_, and >you have to trace it back to the offending line. Why are you using $_ instead of _ ? _ will expand the last word in the previous command line and you'll see it expanded before you hit return. This works in vi editing mode. It can be preceeded with a number n to use the n-th word from the BEGINNING of the last command instead of the last word. If you have the ksh book, look at the top of page 116. Eduardo Krell AT&T Bell Laboratories, Murray Hill, NJ UUCP: {att,decvax,ucbvax}!ulysses!ekrell Internet: ekrell@ulysses.att.com