LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Readline command issue... (https://www.linuxquestions.org/questions/linux-general-1/readline-command-issue-641118/)

ddenton 05-09-2008 02:01 PM

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

MensaWater 05-09-2008 02:48 PM

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.

ddenton 05-09-2008 03:37 PM

It's definitely bash on both machines.

$echo $SHELL returns:
/bin/bash

raskin 05-09-2008 03:50 PM

Try "echo $TERM" to see terminal settings set name.

ddenton 05-09-2008 03:58 PM

Both show "xterm"...

ddenton 05-09-2008 04:08 PM

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

raskin 05-10-2008 02:18 AM

Well, "vi" mode has some other bindings, that are counter-intuitive even for me as Vim user. Try syncing all options you can sync..

MensaWater 05-10-2008 09:17 AM

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.

JanTomka 05-16-2010 11:10 PM

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


All times are GMT -5. The time now is 05:24 AM.