[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Colour support in editline
On May 6, 4:25pm, mejedi%gmail.com@localhost (Nick Zavaritsky) wrote:
-- Subject: Re: Colour support in editline
| > 2. It can include printable characters; look at how the tcsh code does it=
| > For example, I can have an escape sequence in the prompt that sets the
| > xterm title bar.
| If my understanding is correct, the "set xterm title=E2=80=9D thing works r=
| ight now, because
| prompt_print just passes the escape sequences through uninterpreted.
Right, the problem again is how to count character positions so that libedit's
cursor position can be computed. This is not consistent and does not work
correctly in many cases (rprompt for example).
| > 1. It has to be terminal independent; you can't just parse+construct esca=
| > sequences. Use terminfo to get the information for the known attributes=
| We can probably parse them, why not? But I agree that construction should
| be terminal independent.
People can construct them using tput(1). How are you going to parse them then?
Using memcmp() with the terminfo strings?
| So what about parsing escape sequences in the prompt? We can extract sequen=
| dealing with text presentation and let the remaining ones pass through as i=
| t is currently
Why are you assuming that people are going to pass ansi escape sequences only?
If we assume ansi strings the problem becomes much simpler. We can hard-code
a lot of the editor code and stop using terminfo for example...
Main Index |
Thread Index |