Given that use of termcap/terminfo seem to be beyond the scope of ksh (at least 
as of now),
could there be a provision added for a command line edit plugin, not unlike the 
"builtin"
command being used to load shared objects that add builtin commands?  In 
addition to
editing the current command line proper, it would have to provide suitable 
access to the
command history.

That might allow the level of inline editing that might make some folks more 
comfortable, without making termcap/terminfo part of ksh proper.  It might also 
allow LGPL code from elsewhere to provide plugins without licensing concerns.

One thing I know I'd like such a plugin for is mapping of keyboard arrow keys.  
The vi
editor can do it; I can kind of fake it using a KEYBD trap, playing around with 
.sh.edmode and .sh.edchar, and having previously initialized some variables for 
the function that handles the trap to use from commands like "tput kcuu1" and 
so on.  But that's horrifically ugly, and I haven't been able to do that in a 
really quirkless manner.

For users not comfortable with powerful editors, a plugin that behaved like DOS 
command
line editing (including history access) would be nice; just arrow keys and 
insert toggle
key and maybe ctrl-break/^C and one or two more (and of course return).

Anyway, a framework for such plugins ought to put an end to requests for new 
command
line editing functionality, insofar as it would provide a way to say "you want 
it, here's
how you can add your own".
 
 
This message posted from opensolaris.org

Reply via email to