Ticket #82 (new enhancement)

Opened 5 years ago

Last modified 5 years ago

Custom key actions written in Haskell

Reported by: guest Owned by:
Priority: minor Milestone:
Version: 0.6 Keywords:


My ~/.inputrc maps <up> and <down> to history-search-backward and history-search-forward in programs that use readline. This functionality is simply not available in haskeline. If it was, I couldn't bind it to <up>/<down> because as far as I can see haskeline only offers vi-style key remapping, not binding to input editing functions. There also doesn't seem to be a way to add actions from Haskell; getInputLine is a black box without hooks.

So what I want right now is history-search-backward/forward but I also think there should be a comprehensive set of bindable line editing functions and a way to define new functions in Haskell.

Change History

Changed 5 years ago by judah

  • priority changed from major to minor
  • summary changed from there is no history-search-backward/history-search-forward to Custom key actions written in Haskell

The current key-bindings functionality is documented in the following pages:

http://trac.haskell.org/haskeline/wiki/KeyBindings http://trac.haskell.org/haskeline/wiki/CustomKeyBindings

By default, history search is bound to ctrl-r and ctrl-s. You can rebind those commands to up/down by adding the following commands to a ~/.haskeline file:

bind: up ctrl-r
bind: down ctrl-s

I agree it would be nice to be able to define new functions in Haskell using some sort of plugins functionality similar to that of xmonad or yi. However, it's unclear to me whether this is feasible since those are standalone applications, whereas Haskeline is a library used by multiple programs.

Note: See TracTickets for help on using tickets.