In ZSH prompt expansion, the command %E is supposed to "Clear to end of line."

This works: enter image description here

However, it does not work in tmux: enter image description here

The issue seems to be with BCE (Background Color Erase). In screen, I can add the option defbce on. I can't find any similar setting for tmux. Does it exist?

  • ensure you are not overriding TERM=screen to something else.
    – meuh
    Commented Dec 28, 2015 at 8:46
  • Without tmux TERM is xterm-256. With tmux, TERM is screen.
    – JoshuaD
    Commented Dec 28, 2015 at 19:04

1 Answer 1


Unlike screen, tmux does not have switchable background colour erase capability in its terminal emulator. Erasure is always with the default background colour, never the current background colour.

Nicholas Marriott added it to the to-do list in September 2015, but stated at the time that neither he nor anyone else cares enough about it to implement it.

He later implemented it in October 2016, nearly a year after this answer was originally written.

Further reading

t_ut turns off BCE. tmux should support BCE but it depends on the tmux version, I think 2.1 is too old.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .