On Friday, 2011-04-15, at 12:30:21 +0000, Ben Boeckel wrote: > Tiago Resende <trese...@lavabit.com> wrote: > > I'm gonna take a guess here. I think urxvt is reporting to support sitm > > when it actually doesn't, then screen-256color does its switch between > > sitm and smso, then less requests standout but gets italics instead, > > which urxvt simply refuses to render. I just reproduced it with xterm > > exporting TERM=rxvt-unicode-256color. > > Fun.
This is really screen's fault. If they wanted standout instead of italics, all they'd have to do is set sitm to \e[7m, there's no reason to then set smso to \e[3m. No reason at all. (Actually, there probably _is_ some weird reason behind this, but I have no idea what it might be). I'm trying to come up with a way to test for this in tmux's code. Testing for TERM=screen(-256color) to disable italics even if the original $TERM supports it sounds pretty awkward. Well, I'll give it some more thought. Meanwhile, here's how you can workaround: a) if you want to have tmux behaving exactly like urxvt, compile a custom terminfo and tell tmux to use, as discussed previously in this thread: $ mkdir -p $HOME/.terminfo/ $ infocmp screen-256color | sed \ -e 's/^screen[^|]*|[^,]*,/screen-it|screen with italics support,/' \ -e 's/smso=[^,]*,/smso=\\E[7m,/' \ -e 's/rmso=[^,]*,/rmso=\\E[27m,/' \ -e '$s/$/ sitm=\\E[3m, ritm=\\E[23m,/' > /tmp/terminfo $ tic /tmp/terminfo $ echo "set -g default-terminal 'screen-it'" >> ~/.tmux.conf b) if you want tmux to render italics as reverse, unlike urxvt, then do the same thing, but get rid of sitm if it exists: $ mkdir -p $HOME/.terminfo/ $ infocmp screen-256color | sed \ -e 's/^screen[^|]*|[^,]*,/screen-noit|screen with proper standout,/' \ -e 's/smso=[^,]*,/smso=\\E[7m,/' \ -e 's/rmso=[^,]*,/rmso=\\E[27m,/' \ -e 's/ \?sitm=[^,]*,//' \ -e 's/ \?ritm=[^,]*,//' > /tmp/terminfo $ tic /tmp/terminfo $ echo "set -g default-terminal 'screen-noit'" >> ~/.tmux.conf c) if you want tmux _and_ urxvt to render italics as reverse, do the same as above, but also make your own terminfo for urxvt: $ infocmp rxvt-unicode-256color | sed \ -e 's/^rxvt[^|]*|[^,]*,/rxvt-unicode-256color-noit|urxvt with no italics/' \ -e 's/ \?sitm=[^,]*,//' \ -e 's/ \?ritm=[^,]*,//' >> /tmp/terminfo $ tic /tmp/terminfo Then add 'export TERM=rxvt-unicode-256color-noit' to your ~/.zshrc, ~/.bashrc, etc. BTW, it might be a good idea to check /tmp/terminfo before running tic, given my past sed performance. ;) > > $ echo '\e[3mitalics\e[m' '\e[7mstandout\e[m' > > Both do normal "italics" and reverse "standout". I was thinking, urxvt has always (I think) supported italics, so unless your build was specifically patched to remove it (not disable it during /configure, because if that was the case, urxvt _would_ render italics as reverse), maybe you are just missing a font with italics? urxvt's faq recommends Bitstream Vera; I personally use Dina. You can use anything that is installed in your system and has italics. You can try it with $ urxvt -fi "xft:Bitstream Vera Sans Mono:italic:autohint=true" for example. Then, echo '\e[3mitalics\e[m' should render italics. To store it permanentely, add urxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:autohint=true to ~/.Xdefaults Also, could you let us know if this is the case? If so, it might be a good idea to mention it in the faq. ------------------------------------------------------------------------------ Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users