Using arrow keys

Hello,

I am unable to use the arrow keys in some applications. For example, in bash, I am able to use the arrow keys to to go back and forth characters in current line and search the history--I can do everything you'd expect to be able to do with the arrow keys. However, in bc, I cannot use the arrow keys. Instead I get "^[[A", "^[[B", etc. I get the same result in the python shell. I gnome-terminal, and I don't see any options to modify this behaviour. I get the same behaviour in dtterm and xterm. Any ideas? I'm using 5.10.

Thanks.

bc doesn't support arrows and history.

Use GNU bc for that feature, eg. gbc from blastwave.

I think I am:
$ bc -v
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.

This is the same version that exists on a NetBSD box, and I am able to use the arrow keys.

I've used Python on other platforms (Linux, NetBSD), and I am able to use the arrrow keys to back and forth through the history and current command.

Apparently the version of Python I have was not compiled with the readline library: A. Interactive Input Editing and History Substitution . My sysadmin isn't willing to recompile Python.
However, I can compile GNU bc locally. When I compile bc with the readline option, I get the following message:

./configure --with-readline
...
checking for readline in -lreadline... (cached) no

When I go through the Makefiles, I see no reference to readline. I have readline installed in /usr/local/lib:

ls *readline*
libreadline.a     libreadline.so    libreadline.so.4

This doesn't seem to be a Sun Solaris issue. Can this be moved to the Dummies forum?