[haskeline] #106: Do not insert escape codes for unrecognised commands

haskeline haskeline at projects.haskell.org
Fri Apr 16 01:15:53 EDT 2010


#106: Do not insert escape codes for unrecognised commands
-------------------+--------------------------------------------------------
Reporter:  duncan  |       Owner:     
    Type:  defect  |      Status:  new
Priority:  major   |   Milestone:     
 Version:  0.6     |    Keywords:     
-------------------+--------------------------------------------------------
 Currently for key combinations that haskeline does not recognise as
 mapping to a specific command, it inserts the raw escape characters. I
 can't see any use case where that is desirable behaviour. For example:

 {{{
 $ ghci
 GHCi, version 6.12.1: http://www.haskell.org/ghc/  :? for help
 Loading package ghc-prim ... linking ... done.
 Loading package integer-gmp ... linking ... done.
 Loading package base ... linking ... done.
 Loading package ffi-1.0 ... linking ... done.
 Prelude> 1;5C1;5D
 }}}

 (for the unrecognised key combo ctl-left ctl-right)

 The bug here is not that this combo is not recognised, but that it does
 something surprising and counterproductive.

 Unrecognised commands should either be ignored completely or they should
 elicit some explicit behaviour to indicate they are unrecognised. For
 example readline beeps/flashes the window when you go left when already at
 the beginning of the buffer. In that readline situation it's a recognised
 command that is inapplicable in the context; using the same behaviour for
 unrecognised commands seems sensible.

-- 
Ticket URL: <http://trac.haskell.org/haskeline/ticket/106>
haskeline <http://example.org/>
My example project


More information about the Haskeline mailing list