From: jm@moonbase.uvo.dec.com (John McNulty)
Subject: Re: up-arrow repeat of last 'x' commands anyone?
Date: 1 Jul 1994 10:43:48 GMT [thread overview]
Message-ID: <2v0s14$3a1@decuk.uvo.dec.com> (raw)
In-Reply-To: 27JUN199408573842@acad1.alaska.edu
> 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<search string> 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"
prev parent reply other threads:[~1994-07-01 10:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-06-27 17:57 up-arrow repeat of last 'x' commands anyone? Jason D. Bourgoin
1994-06-27 13:21 ` Leif Sawyer
1994-06-27 17:44 ` Andrew Gallatin
1994-06-27 18:41 ` Tim Llewellyn in Bristol. (0272) 303606.
1994-06-27 19:57 ` Jon Mauney
1994-06-27 20:57 ` oberman
1994-07-01 10:43 ` John McNulty [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox