It is currently Tue, 17 May 2022 18:38:40 GMT

Author Message
 ksh - shorcuts
Does ksh support the display of previous commands (history) by using the
UP ARROW key (tcsh supports it).

 Tue, 03 Jun 2003 09:24:10 GMT   
 ksh - shorcuts

Yes it does!
Put the following lines in your .profile:

   set -o emacs
   alias __A='^P'
   alias __B='^N'
   alias __C='^F'
   alias __D='^B'
   alias __H='^A'
   alias __P='^D'

But be careful:
1. Strings in quotes are not literal but CTRL sequences,
    so it will not work if you just copy and paste the above lines!
    Using the vi editor, you can enter them by typing:
          CTRL-v CTRL-[letter]

2.  There are *two* underscores in front of the letters A...P!)

    Damir Wilder

 Tue, 03 Jun 2003 20:42:50 GMT   
 ksh - shorcuts
No, that's one of the nice additional features of tcsh. If you want to
execute one of the previously typed commands though, you can type history to
get a list first and then type the number of the command you want prefixed
by !. As an example, !12 will execute the command number twelve in your
history list.

 Wed, 04 Jun 2003 01:00:22 GMT   
 ksh - shorcuts

Only on ksh88 (not on ksh93), implementing ANSI terminal control sequences.


 Wed, 04 Jun 2003 02:44:33 GMT   
 ksh - shorcuts
    sorry, but no, you can't use '!12'! That is the csh history
mechanism, not the ksh history mechanism. Although you could do 'r 12'
as ksh aliases r to 'fc -e -' which does the same basic thing.

    I recommend learning vi or emacs mode history editing via a good
ksh book (O'Reilly's "Learning the Korn Shell' is good). You could also
use bash if you want to use arrow keys and still have a ksh-like shell.


In article <>,
  Lekeas GK <> wrote:

Sent via

 Wed, 04 Jun 2003 03:00:42 GMT   
 ksh - shorcuts

Do you mean it can't be done in ksh93, or it isn't done that way?

 Wed, 04 Jun 2003 10:06:14 GMT   
   [ 6 post ] 

Similar Threads

1. Opera shorcut on Gnome desktop..How?

2. 2.6 /sbin/ksh vs /bin/ksh

3. ksh script problem: pwd works differently for ksh then linux binary file

4. root has /bin/ksh while users have /usr/bin/ksh

5. Urgent for KSH Gurus : matching source and target lists to create new one(ksh)

6. ksh to csh and/or csh to ksh

7. What incompatibilities between ksh 12/28/93e and ksh 11/16/88h

8. ksh head ache - here doc within a ksh function

9. ksh head ache - here doc within a ksh function

10. ksh: how to exit ksh parent with jobs running in background

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software