I'm running Xubuntu 12.04, and when I use the Terminal I get colored filenames from ls
. But inside tmux, everything ls prints is white. I know my tmux supports color, though, because I get color syntax highlighting when I run vim. My ~/.tmux.conf has this line already:
set -g default-terminal "screen-256color"
Here are some environment variables (from within tmux):
$ env | grep COLOR
LS_COLORS=di=34:ow=34
$ echo $TERM
screen-256color
How can I get ls to show me color when inside tmux?
LS_COLORS
is a bit sparse. Tryeval "$(dircolors)"
. – jw013 Oct 17 '12 at 23:05type ls
when inside tmux. – phunehehe Oct 17 '12 at 23:41dircolors -p > clrdb.txt
(-p
is--print-database
) and then examine it peace and quiet. If you find patterns that apply to the files you are listing, as well as (for example) the--color=always
option (would be a fair bet) ontype ls
(as mentioned), and still no colors, ls shouldn't be where the shoe hurts. If you have an alias or anything that blocks ls, try\ls
and give the color option explicitly. – Emanuel Berg Oct 18 '12 at 00:20type ls
givesls is /bin/ls
, and after sayingsource ~/.bashrc
it givesls is aliased to 'ls --color=auto'
, so the problem was I wasn't sourcing~/.bashrc
. Thanks! – Paul A Jungwirth Oct 18 '12 at 16:36