Using arrow keys


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 06-04-2008
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.

Last edited by cooldude; 06-04-2008 at 05:11 PM..
# 2  
Old 06-05-2008
bc doesn't support arrows and history.

Use GNU bc for that feature, eg. gbc from blastwave.
# 3  
Old 06-05-2008
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.
# 4  
Old 06-12-2008
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:
Code:
./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:
Code:
ls *readline*
libreadline.a     libreadline.so    libreadline.so.4

# 5  
Old 06-13-2008
This doesn't seem to be a Sun Solaris issue. Can this be moved to the Dummies forum?
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Read a multiline text from a console - supporting arrow keys wenclu Shell Programming and Scripting 8 10-16-2012 01:51 AM
Arrow keys binding in AIX v5.3 - how? alex_5161 UNIX for Dummies Questions & Answers 2 12-22-2011 06:40 PM
Tux-HJKL as arrow keys dotancohen UNIX for Dummies Questions & Answers 2 09-01-2011 04:14 PM
What are public keys in ssh and how do we create the public keys?? ravi3cha Shell Programming and Scripting 1 09-01-2010 01:39 AM
SSH closes connection when using arrow keys stv_t UNIX for Advanced & Expert Users 0 09-17-2009 06:53 AM
problem using arrow keys in bash shell Moumou Shell Programming and Scripting 2 07-17-2009 03:14 AM
Using arrow keys in shell scripts cambridge Shell Programming and Scripting 4 05-26-2009 06:15 AM
SunOS 5.10 - VI Arrow keys not working ravashingravi UNIX for Dummies Questions & Answers 7 12-01-2008 10:22 AM
up arrow character alex1982 UNIX for Dummies Questions & Answers 1 10-16-2008 01:26 AM
command scrolling using arrow keys hemangi13 UNIX and Linux Applications 4 09-11-2008 12:53 PM
How to read arrow keys on really old bash? simonb Shell Programming and Scripting 1 05-01-2006 10:27 AM
how do I get my arrow keys to work for looking thru my PREVIOUS UNIX COMMANDS spotnis UNIX for Dummies Questions & Answers 11 09-14-2005 01:22 AM
arrow keys / special keys raguramtgr UNIX for Dummies Questions & Answers 3 02-20-2004 01:45 AM
vi down arrow key not working artjaniger UNIX for Dummies Questions & Answers 2 06-27-2003 11:40 AM
Trapping Arrow keys nageshrc Shell Programming and Scripting 1 11-30-2001 02:36 PM