[GRASS5] Arrow keys and default pager

Glynn Clements glynn.clements at virgin.net
Wed Apr 4 12:42:16 EDT 2001


Andrea Aime wrote:

> I'm using latest GRASS cvs, XFree 4.01 and KDE 2.1. Every time I start
> GRASS in text mode I find problems with the user interface: arrow keys
> are not interpreted the right way

Define "right". Do you mean they aren't interpreted the way that the
GNU "readline" library interprets them? If so, that's because GRASS
doesn't use readline.

> and I get strange characters on the screen (a couple of chars every
> time I hit and arrow).

Presumably [A (B/C/D) or OA (B/C/D), depending upon the terminal. 
These are the common escape sequences for the arrow keys, minus the
actual escape character.

> This is the only program to do that,

I doubt that. What about "cat"? More likely, this is the only
interactive terminal-based program which you use which does this (the
rest use readline).

> plain terminal emulators

I take it that you mean a terminal emulator running a shell, e.g. 
"bash".

> and other programs are working fine...

By which you mean they do respond to the arrow keys in some way?

> any idea on how to solve that?

Define "solve". If you mean "make the arrow keys behave like they do
in readline", that means not just interfacing to readline (not a
trivial task), but also handling the case when readline isn't
available.

> Second issue: I see that the default pager for GRASS man pager is "more",
> but under linux the default pager is usually "less", much more powerful
> and easier to use.

All systems have "more"; not all have "less". Hence "more" being the
default. I believe that GRASS will honour $PAGER if it is set.

> I'm getting tired of typing "export PAGER=less" every
> time I login in GRASS...

Then use ~/.profile (or ~/.bash_profile); that's what it's there for.

> couldn't it be a default option if "less" is
> available on the machine (at least under Linux)?

It could, but it shouldn't. It's up to the user to ensure that PAGER
is set correctly.

-- 
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