Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Command Line Recall

0 views
Skip to first unread message

Paul

unread,
Dec 3, 1999, 3:00:00 AM12/3/99
to
Hi

I need some help. I use reflection (emulator) to get to my SCO 5.0.5 box.
However whenever I press the delete key it goes to the next line and I have
to re-type the command. Quite often when I'm doing bits to it I need to
type the same command repeatedly (the other UNIX boxes that I have here you
can just hit the UP ARROW key).

Unfortunately I don't know how the other UNIX boxes acheieved this, but I
would imagine it was by editing the .Profile perhaps.

Can anyone tell me how to get command line recall and also a delete key??

I believe I'm using the Korn shell.

Sorry for my ignorance but I am now starting to get RSI???

Thanks, Paul.

Roberto Zini

unread,
Dec 3, 1999, 3:00:00 AM12/3/99
to

For the 'delete' remapping see 'man stty'; as an example,
stty intr "^C" will map CONTROL-C instead of 'Del' as the
interrupt key.

As for the command line recalling, if you're actually using
the ksh try with 'set -o vi' (or 'set -o emacs'); you can
then either use the vi(C) cursor movement commands to
edit the command history or the emacs one (as an example,
if you prefer using the vi(C) style, 'ESC K' will retrieve
the last typed command.

Hope this helps !

Best,
Roberto
--
---------------------------------------------------------------------
Roberto Zini email : fr...@strhold.it
Technical Support Manager -- Strhold Sistemi EDP Reggio Emilia(ITALY)
---------------------------------------------------------------------
"Has anybody around here seen an aircraft carrier?"
(Pete "Maverick" Mitchell - Top Gun)

Simon Keates

unread,
Dec 3, 1999, 3:00:00 AM12/3/99
to Paul
Hi Paul

If you are running the korn shell then the following will allow you to
use the standard vi keys...

in the .profile add a line with:
set -o vi

You can then use esc-k to repeat the last typed command and if you keep
pressing k it will scroll through you sh_history. Also you can search
the list by using the /(search word) and then even edit the line by
using the h-back j-down k-up and l-forward keys to navigate as well as
the w-jump-word key. After a little practice you will find this quite
easy to do!

You could also use the emacs keys option but the vi option is the
easiest to set up!

Regards Simon

Paul wrote:
>
> Hi
>
> I need some help. I use reflection (emulator) to get to my SCO 5.0.5 box.
> However whenever I press the delete key it goes to the next line and I have
> to re-type the command. Quite often when I'm doing bits to it I need to
> type the same command repeatedly (the other UNIX boxes that I have here you
> can just hit the UP ARROW key).
>
> Unfortunately I don't know how the other UNIX boxes acheieved this, but I
> would imagine it was by editing the .Profile perhaps.
>
> Can anyone tell me how to get command line recall and also a delete key??
>
> I believe I'm using the Korn shell.
>
> Sorry for my ignorance but I am now starting to get RSI???
>
> Thanks, Paul.

--
SIMON KEATES - EUROGRAPHIC INDUSTRIES LTD
==============================================
Email: si...@eurographics.co.uk
Home Page: http://www.eurographics.co.uk
Tel (direct): +44 (0) 1794 500877
Fax: +44 (0) 1794 500801
==============================================
See "The Hounds of The Morrigan" all new
Home Page at http://www.the-morrigan.co.uk
==============================================

CoWjUiCe

unread,
Dec 3, 1999, 3:00:00 AM12/3/99
to
Add this to your .profile

HISTFILE=$HOME/.sh_history
HISTSIZE=512
EDITOR=vi
export HISTFILE HISTSIZE EDITOR
exec ksh

To call up a previous command type ESC-K.
Then treat the command line as if you are in vi.
hjkl to move along the command line.
a, r, i, o, modes to change text in command line.
u, to undo.
dd, to delete the line
dw to delete a word in the line
yadda yadda yadda... you get the picture!

Regards,

RBA.

Richard Howlett

unread,
Dec 3, 1999, 3:00:00 AM12/3/99
to
Paul wrote:
>
> Hi
>
> I need some help. I use reflection (emulator) to get to my SCO 5.0.5 box.
> However whenever I press the delete key it goes to the next line and I have
> to re-type the command. Quite often when I'm doing bits to it I need to
> type the same command repeatedly (the other UNIX boxes that I have here you
> can just hit the UP ARROW key).
>
> Unfortunately I don't know how the other UNIX boxes acheieved this, but I
> would imagine it was by editing the .Profile perhaps.
>
> Can anyone tell me how to get command line recall and also a delete key??
>
> I believe I'm using the Korn shell.

It would appear that your delete key is working as most people would want it
to work. ie Delete aborts the current command.

As regards command recall, seeing as you have ksh, then add the following
lines to the bottom of your .kshrc file in your $HOME directory:

set -o emacs
alias __A=$(print '\0020') # ^P = up = previous command
alias __B=$(print '\0016') # ^N = down = next command
alias __C=$(print '\0006') # ^F = right = forward a character
alias __D=$(print '\0002') # ^B = left = back a character
alias __H=$(print '\0001') # ^A = home = beginning of line

--
Richard Howlett

mailto:ric...@howie.org.uk


0 new messages