LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-09-2008, 02:01 PM   #1
ddenton
Member
 
Registered: May 2007
Posts: 114

Rep: Reputation: 15
Readline command issue...


I'm having an issue getting readline commands in bash to work. I have some RHEL 4 boxes that execute the commands perfectly (control-e jumps to end of line, control-l clears the screen, etc...) but my RHEL 3 boxes don't behave as they should.

I've compared the /etc/inputrc files and they're identical, and I've even tried tweaking the file (changing the "#"\e[4~": end-of-line" entry to ""\C-e": end-of-line") but no change, even after sourcing /etc/profile which refers to /etc/inputrc.

I'm accessing the boxes via ssh, and AFAIK that shouldn't make a difference, as I'm accessing the RHEL 4 boxes the same way with no issues.

Can anyone shed some light on this? It would be greatly appreciated...
 
Old 05-09-2008, 02:48 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Verify you're using the same shell on both after login. You might be running bash on one and ksh on the other. Also there are two flavors or ksh out there for RHEL. pdksh was the older one which wasn't POSIX compliant. The ksh package is however. If using ksh you want to type "rpm -qa |grep ksh" to see which you have installed on each.
 
Old 05-09-2008, 03:37 PM   #3
ddenton
Member
 
Registered: May 2007
Posts: 114

Original Poster
Rep: Reputation: 15
It's definitely bash on both machines.

$echo $SHELL returns:
/bin/bash
 
Old 05-09-2008, 03:50 PM   #4
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Try "echo $TERM" to see terminal settings set name.
 
Old 05-09-2008, 03:58 PM   #5
ddenton
Member
 
Registered: May 2007
Posts: 114

Original Poster
Rep: Reputation: 15
Both show "xterm"...
 
Old 05-09-2008, 04:08 PM   #6
ddenton
Member
 
Registered: May 2007
Posts: 114

Original Poster
Rep: Reputation: 15
Just noticed something...

I ran "set" to check all of my variables, and on a "non-working" machine, this is the contents of the SHELLOPTS variable:

SHELLOPTS=braceexpand:hashall:histexpand:interactive-comments:monitor:vi

This is from the "working" machine:

SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor

I'm guessing that "emacs" being in the this variable versus "vi" might have something to do with it? Maybe I'm off-base...
 
Old 05-10-2008, 02:18 AM   #7
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900

Rep: Reputation: 69
Well, "vi" mode has some other bindings, that are counter-intuitive even for me as Vim user. Try syncing all options you can sync..
 
Old 05-10-2008, 09:17 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Easy enough to test.

On the non-working machine do:
export OLDOPTS=$SHELLOPTS
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
Test your command.
Once done to revert to original settings just type:
SHELLOPTS=$OLDOPTS

Personally I don't care for emacs so I'd change it permanently to vi on both sides but since you're saying it "works" on the one with emacs that's the one you'd want to try.
 
Old 05-16-2010, 11:10 PM   #9
JanTomka
LQ Newbie
 
Registered: May 2010
Posts: 3

Rep: Reputation: 0
Readline Commands Cheat Sheet

Hi there, You might also be interested in a readline commands cheat sheet i've created recently:
http://jan.tomka.name/project/readli...nds-cheatsheet
 
  


Reply

Tags
bash, readline



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Readline command issue... ddenton Linux - Newbie 1 05-09-2008 02:01 PM
Where is readline on Linux? endfx Linux - Software 4 02-06-2008 01:43 PM
Using cat readline within cat readline while loop demxkn66 Programming 5 12-16-2007 05:10 PM
Readline command error Jacko123 Programming 1 03-02-2007 07:51 AM
readline compile feetyouwell Programming 1 10-06-2004 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration