I am trying to switch from screen to tmux. When I run hg status, I get damaged output like this:
It doesn't happen to git, it doesn't happen with screen. Any advice will be very appreciated. Thanks.
I am trying to switch from screen to tmux. When I run hg status, I get damaged output like this:
It doesn't happen to git, it doesn't happen with screen. Any advice will be very appreciated. Thanks.
Hmm, it seems like hg is doing something very strange. My guess is it has got completely the wrong idea about how to show colour, but there should be no reason for it to do anything different in tmux than screen.
What does echo $TERM
show inside tmux before you run hg? What does it show outside tmux?
Have you created a .hgrc
or similar configuration file? What's in it?
Is it the same if you do \hg --pager never --color always status
?
What does \hg --pager never --color always status|od
show?
Based on an answer from Nicholas Marriott and comment from Rudi: the problem seems to be that $TERM is set to screen
in tmux (whilst std. gnome-terminal has it set to xterm-256color
and screen to screen.xterm-256color
).
Therefore the solution (at least the one working for me) is to set terminal in the ~/.tmux.conf
as follows:
set -g default-terminal "screen.xterm-256color"
Note: using hg --pager never
also works, however that is not an acceptable solution.