I am trying to
customize an interactive application (console), which uses the readline
function. I would like to customize it's prompt color (e.g. when running on
production system). I soon found out that including the color escape sequences
in the prompt is a bad idea (length problems).
Browsing the web I
found that rl_startup_hook and rl_pre_input_hook can do the job, but only when
the library displays the initial prompt. When it is redrawn, these hooks are not
called.
What is the most
convenient way (i.e. least effort necessary) to fix this?