Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

ANSI bg colour outside of prompt area

Hey Guys!

This is my first ever mailing list post, please let me know if I'm doing this improperly!!

I was wondering if anyone has had any success setting BG colours in their terminal with ANSI escape sequences or with some other method. I had some aliases with escape sequences that I used for bash and shell that would change the background colour. The colour was never reset, and clearing the screen would change the entire terminal's background colour.

ex: echo -ne "\033[1;33;43m"

In zsh, the background color gets reset once the characters have been printed.
	kecho -ne "\033[1;33;43m abcdefg"

I've tried using zle_highlight, or appending to the end of PROMPT, but (as documented) it only colours the editeable lines in the terminal:

I also came across a neat tweak on the mailing list that allows you to change the colour of errors (which is neat, but still not what I'm looking for):
	preexec() { echo -en "preexec () { echo -n "\033[11;43m"; }

I'm running out of steam though I hoped maybe that precmd or something like that might yield some results but I'm a little stuck at the moment. Any chance that any of you might be able to nudge me in a different direction?

Thanks Again,
- Will

Messages sorted by: Reverse Date, Date, Thread, Author