Changes between Version 3 and Version 4 of ControlSequencesInPrompt

Show
Ignore:
Timestamp:
09/13/10 21:25:59 (4 years ago)
Author:
judah (IP: 75.85.89.204)
Comment:

minor edits

Legend:

Unmodified
Added
Removed
Modified
  • ControlSequencesInPrompt

    v3 v4  
    11= Escape Sequences in the Prompt String = 
    22 
    3 As of version 0.6.3 (#78), Haskeline will compute the correct width for input prompts that contain POSIX escape sequences such as color changes.  However, the ending must be indicated in the prompt string, since there's no way for Haskeline to detect it automatically. 
     3As of version 0.6.3 (#78), Haskeline will compute the correct width for input prompts that contain POSIX escape sequences such as color changes.  However, the prompt string must indicate the end of each escape sequence, since there's no way for Haskeline to detect it automatically. 
    44 
    5 The ending is denoted by the control character {{{'\STX'}}} (i.e., ASCII {{{'\002'}}}).  Any substring in the prompt of the form {{{"\ESC...\STX"}}} will be treated as zero-width for the purposes of line-breaking. 
     5The end is denoted by the control character {{{'\STX'}}} (i.e., ASCII {{{'\002'}}}).  Any substring in the prompt of the form {{{"\ESC...\STX"}}} will be treated as zero-width for the purposes of line-breaking. 
    66 
    77On Windows, escape sequences of the form "\ESC...\STX" will be ignored. 
     
    1616If GHC (or the ghci-haskeline package) has been compiled against haskeline-0.6.3 or newer, adding the following line to your `~/.ghci` file will turn the prompt string green: 
    1717{{{ 
    18 :set prompt "\SOH\ESC[1;32m\STX%s>\SOH\ESC[0m\STX" 
     18:set prompt "\ESC[1;32m\STX%s>\ESC[0m\STX" 
    1919}}} 
    2020