I'd like to enable colored text output on SSH one-liner commands, but I can't seem to get it to work on OS X, Ubuntu 14.10, or OpenSUSE 12.2.
If I ssh into a server and type, say,
ls --color=auto in the prompt, it works just fine, showing directories, symlinks, and regular files in different colors, however, if I put the command in an ssh one-liner on the same system:
ssh user@host "ls --color=auto", the output isn't colored.
echo $TERM gives me
xterm-256color whether or not I put it in a one-liner statement.
This is mainly for color-coding errors and warnings on remote builds, but it would be nice to get it enabled for everything.