* Re: up-arrow repeat of last 'x' commands anyone?
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
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Leif Sawyer @ 1994-06-27 13:21 UTC (permalink / raw)
In article <27JUN199408573842@acad1.alaska.edu>, jsjdb@acad1.alaska.edu (Jason D. Bourgoin) writes:
> 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.
>
> Sorry if this is a FAQ, but does anyone have any constructive suggestions?
>
> Thanks in advance
>
> --
> Jason D. Bourgoin
> jsjdb@acad1.alaska.edu
> --
>
Jason -
This isn't so much an OS problem/feature, as it is a shell feature.
he's probably running sh. (ick!) try grabbing BASH (my gnu fave..) or tcsh,
or zsh, or... even csh has some history.
bash compiles real easy on alpha osfs.. (talk to ed@saturn.uaamath.alaska.edu
if you have any questions about it, or me even..)
--
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
| Leif Sawyer -= AXLAS@orion.alaska.edu | UAA CaTS Network Assistant |
| =- or -= leif@saturn.uaamath.alaska.edu | UAA - Computer Services CAS126 |
| USnail -= 925 Eagle #8, Anch AK 99501 | 3211 Providence, Anch AK 99508 |
| "Views expressed by me may not always be those #Defined by my employer." |
GAT d? p c++(+++) l++(+++) u+(-) e+ m* s+/ !n@ h- f+(*) g- w+(++) t++ r x+(*)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: up-arrow repeat of last 'x' commands anyone?
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-07-01 10:43 ` John McNulty
3 siblings, 0 replies; 7+ messages in thread
From: Andrew Gallatin @ 1994-06-27 17:44 UTC (permalink / raw)
In article <27JUN199408573842@acad1.alaska.edu>,
Jason D. Bourgoin <jsjdb@acad1.alaska.edu> wrote:
>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.
>
>Sorry if this is a FAQ, but does anyone have any constructive suggestions?
There should already be a shell on your system that does this:/bin/ksh
If this isn't on your system, or you prefer public domain software, I
would suggest grabbing the latest version of either tcsh, or bash.
Tcsh is an extended version of csh that uses csh style initialization
file syntax, and can be used in place of csh with no differences,
except for command line editing (either emacs or vi style) & file name
completion.
Tcsh does some really cool things that I'm not aware of other shells
being able to do. One is context sensitive filename completion. Via
the command: 'complete cd p/1/d/', I can make tcsh ignore everything
but directories when I ask it to complete filename for the cd command.
Bash is put out by GNU and is descended from sh, (Born Again SH). It
uses sh style initialization file syntax. It also does filename
completion & command line editing.
Have fun,
Drew
##############################################################################
# Andrew Gallatin, System Administrator #
# Institute of Statistics and Decision Sciences #
# Box 90251, Duke University, Durham, NC 27708-0251 #
# email: gallatin@isds.duke.edu #
##############################################################################
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: up-arrow repeat of last 'x' commands anyone?
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
3 siblings, 2 replies; 7+ messages in thread
From: Tim Llewellyn in Bristol. (0272) 303606. @ 1994-06-27 18:41 UTC (permalink / raw)
In article <27JUN199408573842@acad1.alaska.edu>, jsjdb@acad1.alaska.edu (Jason D. Bourgoin) writes:
>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.
>
>Sorry if this is a FAQ, but does anyone have any constructive suggestions?
>
>Thanks in advance
>
We have got tcsh, which does the command recall with arrow keys stuff.
Don't ask me where we got it, a student here picked it up with ftp somewhere,
or ported the Ultrix version or something.
FLAME ON
I can't understand why the command line recall with arrow keys isn't
the OUT-OF-THE-BOX default for these systems. After all, the alpha's come
with keyboards with arrow keys on them. /bin/sh or whatever the default is
is braindead, why do we have to suffer it at all.
FLAME OFF
>--
>Jason D. Bourgoin
>jsjdb@acad1.alaska.edu
>--
>
-----------------------------------------------------+------------------+
Tim Llewellyn - OpenVMS, Soukous and Cricket Addict |Hey, and get wise |
Physicist Programmer, Bristol Uni Particle Physics. | to the sounds of |
HEPNET/SPAN 19716::TJL Internet tjl@siva.bris.ac.uk | Africa,seen. |
I speak for me and noone else OK (and I might even | Soukous Makossa |
change my mind sometimes!-) | N'Dagga Mbalax..|
-----------------------------------------------------+------------------+
Unix : A toy for those who enjoy re-inventing wheels, or have no choice.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: up-arrow repeat of last 'x' commands anyone?
1994-06-27 18:41 ` Tim Llewellyn in Bristol. (0272) 303606.
@ 1994-06-27 19:57 ` Jon Mauney
1994-06-27 20:57 ` oberman
1 sibling, 0 replies; 7+ messages in thread
From: Jon Mauney @ 1994-06-27 19:57 UTC (permalink / raw)
tjl@siva.bris.ac.uk (Tim Llewellyn in Bristol. (0272) 303606.) writes:
>In article <27JUN199408573842@acad1.alaska.edu>, jsjdb@acad1.alaska.edu (Jason D. Bourgoin) writes:
>>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.
>>
>I can't understand why the command line recall with arrow keys isn't
>the OUT-OF-THE-BOX default for these systems. After all, the alpha's come
>with keyboards with arrow keys on them. /bin/sh or whatever the default is
>is braindead, why do we have to suffer it at all.
DEC OSF/1 comes out of the box with 2 shells that support command-line editing,
with your choice of vi or emacs command style.
The Korn shell, ksh, works just like all other Korn shells in this regard.
The C shell, csh, has a very full-featured keyboard editing interface;
see the man page for "cmdedit" for details (the obvious place to put
csh information :-).
It is impossible to create a set of defaults that pleases everyone.
Any sysadmin that can't change his default shell isn't trying very hard.
--
Jon Mauney mauney@csc.ncsu.edu
Mauney Computer Consulting (919) 828-8053
"Have TGT, will travel."
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: up-arrow repeat of last 'x' commands anyone?
1994-06-27 18:41 ` Tim Llewellyn in Bristol. (0272) 303606.
1994-06-27 19:57 ` Jon Mauney
@ 1994-06-27 20:57 ` oberman
1 sibling, 0 replies; 7+ messages in thread
From: oberman @ 1994-06-27 20:57 UTC (permalink / raw)
In Article <Cs2Jx9.4Ev@info.bris.ac.uk>
tjl@siva.bris.ac.uk (Tim Llewellyn in Bristol. (0272) 303606.) writes:
>FLAME ON
>I can't understand why the command line recall with arrow keys isn't
>the OUT-OF-THE-BOX default for these systems. After all, the alpha's come
>with keyboards with arrow keys on them. /bin/sh or whatever the default is
>is braindead, why do we have to suffer it at all.
>FLAME OFF
Don't want to be a fire extinguisher, but all I had to do was:
set editmode=emacs
and it worked just fine in OSF/1 V2.0 with /bin/csh. I have the set command in
my .cshrc file and that does the trick. set editmode=vi also seems to work, but
I don't much care for vi.
R. Kevin Oberman
Energy Sciences Network (ESnet)
National Energy Research Supercomputer Center (NERSC)
Lawrence Livermore National Laboratory (LLNL)
Internet: koberman@llnl.gov +1 510-422-6955
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: up-arrow repeat of last 'x' commands anyone?
1994-06-27 17:57 up-arrow repeat of last 'x' commands anyone? Jason D. Bourgoin
` (2 preceding siblings ...)
1994-06-27 18:41 ` Tim Llewellyn in Bristol. (0272) 303606.
@ 1994-07-01 10:43 ` John McNulty
3 siblings, 0 replies; 7+ messages in thread
From: John McNulty @ 1994-07-01 10:43 UTC (permalink / raw)
> 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"
^ permalink raw reply [flat|nested] 7+ messages in thread