After upgrading to Lion I noticed that the Homebrew theme that I’ve been using since Snow Leopard doesn’t display colors correctly(using different colors for directories, different types of files etc.) any more when working on remote hosts via ssh (local dir colors still work though) and switching to other themes doesn’t help. After messing around with the Terminal settings I finally found the cause and a solution. It seems Lion changed the terminal type to xterm-color256 during the upgrade (don’t remember what the setting was in SL though). The solution is simple enough, just change the emulation type for terminal from xterm-color256 to xterm-color (see screenshot below).
[ Update 1/2/2012 ]
Actually found a better solution here:
1. Keep the current xterm-256color in your Mac Terminal
2. Add the following lines to your ~/.profile on your remote host
[ "$TERM" = "xterm" ] && TERM="xterm-256color" alias ls='ls --color'