ANNOUNCE: GHC version 6.10.1 - EditLine / terminal incompatibility?

Simon Peyton-Jones simonpj at microsoft.com
Wed Nov 19 12:25:20 EST 2008


Would it be worth adding this hard-won lore somewhere on a Wiki where it can be found later?

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of Duncan Coutts
| Sent: 07 November 2008 18:09
| To: GHC-users list
| Cc: Philip K.F. Hölzenspies
| Subject: Re: ANNOUNCE: GHC version 6.10.1 - EditLine / terminal incompatibility?
|
| On Fri, 2008-11-07 at 09:14 -0800, Judah Jacobson wrote:
| > On Fri, Nov 7, 2008 at 4:36 AM, Duncan Coutts
| > <duncan.coutts at worc.ox.ac.uk> 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.
| >
| > http://www.manpagez.com/man/5/editrc/
|
| 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
|
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



More information about the Glasgow-haskell-users mailing list