[haskeline] #78: control characters in prompt mess up width calculations

haskeline haskeline at projects.haskell.org
Sun Aug 16 13:05:37 EDT 2009


#78: control characters in prompt mess up width calculations
-------------------+--------------------------------------------------------
Reporter:  judah   |        Owner:     
    Type:  defect  |       Status:  new
Priority:  minor   |    Milestone:     
 Version:  0.6     |   Resolution:     
Keywords:          |  
-------------------+--------------------------------------------------------
Comment (by judah):

 What Haskeline program(s) are you using color escape sequences with?  I
 wasn't able to get them working in ghci.

 As it turns out, '\[' is a bash-ism which is translated into '\001' before
 the prompt is passed to readline.  Since Haskeline's prompt is (currently)
 just a `String`, it probably also needs to use ugly surrounding characters
 like readline does.  Programs which call Haskeline can provide the nicer
 UI themselves.

-- 
Ticket URL: <http://trac.haskell.org/haskeline/ticket/78#comment:4>
haskeline <http://example.org/>
My example project


More information about the Haskeline mailing list