[GRASS5] Arrow keys and default pager

Glynn Clements glynn.clements at virgin.net
Thu Apr 5 01:35:20 EDT 2001


Markus Neteler wrote:

> > Note: programs which provide line-editing don't generally implement it
> > themselves using curses; they generally use GNU readline.
> > 
> > Of course you could implement something directly with curses, but
> > unless the behaviour exactly matches readline's (allowing for specific
> > settings in ~/.inputrc), newbies will most likely moan about it "not
> > working right".
> 
> All the curses stuff in GRASS might be there due to historical reasons
> (pre-readline time). Maybe we should consider to change to readline
> for 5.1 to get rid of various problems. But I am definitly no expert
> here.
> 
> Do you have any recommendations for to overcome the current problems?

I don't think that readline will work with the current "form" style of
input. It is designed for "command line" line programs (shells, ftp,
gdb, etc) which use a "while true { read line ; execute line }" idiom.

It could be of use in programs which use a strictly sequential dialog,
asking one question at a time.

For the forms, it would certainly be possible, although non-trivial,
to enhance the editing facilities, e.g. arrow keys, Delete, Home, End,
maybe some of the Emacs bindings (C-a/C-e). However, I suspect that
you might still get the odd complaint about it not working "right".

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list