Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!uupsi!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.unix.questions Subject: Re: Retrieve keyboard commands like VM/CMS Message-ID: <24263:Nov415:05:2890@kramden.acf.nyu.edu> Date: 4 Nov 90 15:05:28 GMT References: <1990Nov1.121612.724@vax5.cit.cornell.edu> Organization: IR Lines: 25 In article <1990Nov1.121612.724@vax5.cit.cornell.edu> joc@vax5.cit.cornell.edu writes: > Is there a way to retrieve previously typed commands in UNIX similar > to the way IBM's VM/CMS does it, ie, hit the retrieve key and the > previous command appears and may now be edited on the command line? Check out pmlined 1.5, just posted to alt.sources. It gives you command-line editing on your status line, just like good old VM/CMS. With ^B and ^F you can flip back and forth through recent commands and edit them to be sent through again. That should be what you want. You can use pmlined with any application, not just your favorite shell. Other keys: ^H and ^L give you left-right motion within the line. Characters typed are inserted, and long lines are scrolled horizontally, with arrows indicating unseen chunks. Delete erases to the left. ^W erases a word; ^U erases the entire line to the left. ^A toggles between edit (and history) mode and sending characters through to the native tty driver. ^V lets you enter any character literally. ^D sends the current part-line through, and exits if the application receiving its output does. pmlined is just a few hundred lines, proving that line disciplines don't have to be hard to program. Feel free to modify it to your taste. It should work anywhere pty is installed. ---Dan