pdksh and binding escape sequences to shell commands

Tom McLaughlin tmclaugh at sdf.lonestar.org
Sun May 1 14:46:05 PDT 2005


I'm wondering if any pdksh users can tell me how to bind an escape
sequence to a command.  I want to bind the Home key (^[OH) to
beginning-of-line.  I tried the following but I get a weird result.

bind '^[OH'=beginning-of-line

When I hit the home key the cursor jumps to the beginning of the line
but then prints an H.  For example:

$ foo
(hit Home key)
$ Hfoo  (The cursor now rests after the H.)

Anybody know how to handle getting something like the Home key bound to
a command?  Thanks.

Tom

-- 

BSD# Project - Porting Mono to FreeBSD
http://www.mono-project.com/Mono:FreeBSD



More information about the freebsd-questions mailing list