On Sunday 13 May 2007 21:12, Mick wrote: > I've tried bind -p | grep history and it did not work: > ========================================== > $ sudo bind -p | grep history > Password: > sudo: bind: command not found > ==========================================
bind is a builtin bash command, I'm not sure about how it behaves when invoked by sudo. However, it should work fine even when run as a regular user. > I also tried changing the terminal once I logged in to the remote > machine, but I am getting the same error: > ========================================== > $ export TERM=vt100 > $ ^[[B^[[B > ========================================== > > What else could I try? Could it possibly be related to the readline library and the inputrc file? It seems that some keys are undefined on the machine you are sshing to. In the case of the left arrow (but of course this holds for any key that is not working as expected), try $ bind -q backward-char on both boxes. On my computer, it outputs backward-char can be invoked via "\C-b", "\eOD", "\e[D". Of these, "\e[D" is the one that corresponds to the "left arrow" key. If your output for the non-working computer is different, then it means that the left arrow key is not bound to the same function (or is not bound at all). This could be due to a ~/.inputrc file that redefines some keys. See man bash, section READLINE to get more info about readline. (BTW, there are *lots* of things that can be customized regarding readline behavior, and creating your own inputrc file can be a great learning experience - or at least, it was for me when I did it for LFS). Verify that you are using the same editing mode (usually emacs) on both boxes, with the command set -o | grep '^vi\|^emacs' Check whether the INPUTRC environment variable points to some file. On gentoo, bash does not read /etc/inputrc, but perhaps on ubuntu it does. As a last resort, you can try to create your own ~/.inputrc on the ubuntu box and put there all the key bindings you need (using CTRL+V + key to find out the correct values, as suggested in the comments at the beginning of gentoo /etc/inputrc, or copying them directly from the gentoo output of bind -p). -- [EMAIL PROTECTED] mailing list