Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.