Q: Redefining the command line editing keys in ksh VISUAL=emacs

Q: Redefining the command line editing keys in ksh VISUAL=emacs

Post by Anders Sewerin Johanse » Sat, 10 Jun 1995 04:00:00



Hi all.

I'm using NCR/AT&T MP/RAS on a 486-based PC, and I'm currently into my
first customizing spree ;-) I'd really like to redefine the emacs/gmacs
set of command-line editing keys, but I can't seem to find anything
refering to this in the FM or the manpages. Is it at all possible, og did
I just miss something?

Eagerly awaiting information
  Anders S. Johansen

 
 
 

Q: Redefining the command line editing keys in ksh VISUAL=emacs

Post by Pete Form » Sat, 10 Jun 1995 04:00:00



Quote:> I'm using NCR/AT&T MP/RAS on a 486-based PC, and I'm currently into my
> first customizing spree ;-) I'd really like to redefine the emacs/gmacs
> set of command-line editing keys, but I can't seem to find anything
> refering to this in the FM or the manpages. Is it at all possible, og did
> I just miss something?

These work to some extent on ksh with set -o emacs:

    alias __A=`echo "\020"`   # up arrow = ^p = back a command
    alias __B=`echo "\016"`   # down arrow = ^n = down a command
    alias __C=`echo "\006"`   # right arrow = ^f = forward a character
    alias __D=`echo "\002"`   # left arrow = ^b = back a character
    alias __H=`echo "\001"`   # home = ^a = start of line
    alias __P=`echo "\004"`   # delete = ^d = delete character forward
    alias __Y=`echo "\005"`   # end = ^e = end of line

I use these under aixterm, xterm and AT386 (virtual terminal of ISC).
The arrow keys all work but the others don't work in all cases.

Does anyone have a similar hack for vi mode?
--
Pete Forman
Western Geophysical


 
 
 

Q: Redefining the command line editing keys in ksh VISUAL=emacs

Post by Paul Colbour » Sat, 10 Jun 1995 04:00:00



Quote:>I use these under aixterm, xterm and AT386 (virtual terminal of ISC).
>The arrow keys all work but the others don't work in all cases.

I have the same problem the <delete> key returns ^? and I can't
seem to re-map this to ^d.

Has anyone got any ideas ?

Regards Paul.

 
 
 

1. ksh -o emacs and command-line editing problem

My gut tells me that the following is a known ksh problem.

Occasionally while I am performing command line edits using the emacs
bindings, entering a control char to position the cursor results in the
control char being echoed to the command line. It's as if the shell gets
confused about whether it's in raw or cooked mode.

Are there any work-arounds to eliminate this problem? Suggestions?

System: Solaris 2.6
term: vt100, vt220

...and for what it's worth, MKS's NT port of ksh seems to have included
this problem/bug.

Thanks!

    --Eric

Sent via Deja.com http://www.deja.com/
Before you buy.

2. staroffice

3. Ksh: Command line editing with arrow keys?

4. 4GB option?

5. emacs command line editing in K shell

6. Win/Lin, tcpdump, packet visibility puzzle

7. command line editing using the vi keys

8. suck/NNTP server

9. Using ksh command line edit as Superuser in Solaris

10. ksh Filename Completion using vi command line editing mode?

11. ksh:edit command line

12. How to config ksh to doskey command line editing?

13. HELP: Command-line editing with ksh/csh