From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,bb30585396ebc2a1 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-07-01 04:16:32 PST Path: bga.com!news.sprintlink.net!hookup!swrinde!elroy.jpl.nasa.gov!lll-winken.llnl.gov!decwrl!pa.dec.com!decuk.uvo.dec.com!moonbase.uvo.dec.com!jm From: jm@moonbase.uvo.dec.com (John McNulty) Newsgroups: comp.unix.osf.osf1 Subject: Re: up-arrow repeat of last 'x' commands anyone? Date: 1 Jul 1994 10:43:48 GMT Organization: Digital Equipment Co. Ltd Distribution: world Message-ID: <2v0s14$3a1@decuk.uvo.dec.com> References: <27JUN199408573842@acad1.alaska.edu> Reply-To: jm@moonbase.uvo.dec.com (John McNulty) NNTP-Posting-Host: moonbase.uvo.dec.com X-Newsreader: mxrn 6.18-16 > My sysadmin has expressed an interest in being able to up-arrow recall > the last 'x' commands, much the same way we can from our VAX, on our new > DEC Alpha running OSF1. It seems he does alot of repetitive typing that > he'd like to avoid, but has to retype out commands again and again because > he has no easy way to recall them to the screen. ksh has this feature, plus a number of others. For example, you can use ^R followed by repeat ^R's to leap frog back through your history. I could rabbit on for hours about ksh features, but instead I'll point you at a book to buy, and attach a usefull bunch of setup commands. The KornShell Command and Programming Language Authors: Moris I Bolsky & David G Korn Publisher: Prentice Hall ISBN: 0-13-516972-0 #/ Generic ksh startup /# # Emacs command line editing # export VISUAL=emacs # Settings for vi(1) # export EXINIT='set notimeout redraw wm=5 ai aw sw=1 ic' # Terminal chars for job control # stty intr ^C stty susp ^Z # Map the arrow keys # alias __A=^P alias __B=^N alias __C=^F alias __D=^B # Set the prompt. Show the cpu name with the domain name stripped out, # # the history number, and directory basename # cpu=`uname -n` PS1='"${cpu%%.*} ! ${PWD##*/}> "' # Use a unique history file # [[ -f ~/.$$_history ]] && rm ~/.$$_history export HISTFILE=~/.$$_history # Clean up history file on logout # trap ' [[ -f $HISTFILE ]] && rm $HISTFILE ' 0 -- John McNulty Digital Equipment Corporation CSC/UK Unix Group, "It's not a good omen when Gold fish commit suicide"