libedit ignores editrc file in Ubuntu Lucid

3

1

I'm trying to get ghci (Haskell's interactive command line) to handle Ctrl+Left and Ctrl+Right arrows properly rather than showing garbage like this:

Prelude> 1;5D1;5C

At the bottom of this bug report, it says:

For the standard ghci with editline, you should add the following to your .editrc file:

bind "\e[1;5D" vi-prev-word
bind "\e[1;5C" vi-next-word

I tried adding that to ~/.editrc, but nothing changed. A MySQL bug report tells us that libedit ignores the editrc file on Linux because it doesn't have the issetugid() system call, and it looks like MySQL has its own workaround for the issue.

Does anyone know how to either:

  1. Get libedit to acknowledge ~/.editrc
  2. Get GHCi to handle Ctrl+Arrow correctly

Joey Adams

Posted 2010-08-17T18:11:02.453

Reputation: 2 029

No answers