
On Fri, 2008-11-07 at 09:14 -0800, Judah Jacobson wrote:
On Fri, Nov 7, 2008 at 4:36 AM, Duncan Coutts
wrote: I get some working and some non-working. Eg backspace, del, home, end work, but the ctl-left/ctl-right to jump words does not.
Does anyone know how libedit is supposed to be configured? readline uses /etc/inputrc but libedit either does not or doesn't understand all of it.
/me wonders if it was really necessary to switch from readline
Duncan
You can configure libedit with a ~/.editrc file.
Thanks Judah. To save everyone else having to read the man page and working out through trial and error what the key escape codes are, add the following to your ~/.editrc file. # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving bind "\e[1;5D" vi-prev-word bind "\e[1;5C" vi-next-word (though from reading the readline /etc/inputrc it suggests that "\e[5C" and "\e[5D" might be right on some systems) It's unfortunate that editline does not seem to support any global /etc/editrc file which would enable distros to make it do the right thing by default like they do for readline. Duncan